diff options
author | Zac Medico <zmedico@gentoo.org> | 2021-06-19 14:14:57 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2021-06-19 15:12:17 -0700 |
commit | 0649fbd7ace6eeb0fbdf5c992129abc33f58f0a6 (patch) | |
tree | 623398f6c140c055b1c02041bfe66a73391f2529 /dev-python/yamlpath | |
parent | findlib.eclass: fix licence header (diff) | |
download | gentoo-0649fbd7ace6eeb0fbdf5c992129abc33f58f0a6.tar.gz gentoo-0649fbd7ace6eeb0fbdf5c992129abc33f58f0a6.tar.bz2 gentoo-0649fbd7ace6eeb0fbdf5c992129abc33f58f0a6.zip |
dev-python/yamlpath: Initial import
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'dev-python/yamlpath')
-rw-r--r-- | dev-python/yamlpath/Manifest | 1 | ||||
-rw-r--r-- | dev-python/yamlpath/metadata.xml | 14 | ||||
-rw-r--r-- | dev-python/yamlpath/yamlpath-3.6.0.ebuild | 56 |
3 files changed, 71 insertions, 0 deletions
diff --git a/dev-python/yamlpath/Manifest b/dev-python/yamlpath/Manifest new file mode 100644 index 000000000000..66b3b1648fbe --- /dev/null +++ b/dev-python/yamlpath/Manifest @@ -0,0 +1 @@ +DIST yamlpath-3.6.0.tar.gz 214052 BLAKE2B 6b969a8c6e63f879e9c9f17f4542a48e55987835f99f10867577d93107813b684cfa0bf647f6d11b8ef8f02438e7e72f847eb0a29761a169950f8a5c6ee0ec5b SHA512 377cd281b4e7df251bbb298977c258e1a547ce4726ad321e5bf500242884049d3e052b83b83b72d477111fe121bd483d5122427498a5ebf784ab6d86d92d6ed6 diff --git a/dev-python/yamlpath/metadata.xml b/dev-python/yamlpath/metadata.xml new file mode 100644 index 000000000000..096a53d7d984 --- /dev/null +++ b/dev-python/yamlpath/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <upstream> + <bugs-to>https://github.com/wwkimball/yamlpath/issues</bugs-to> + <changelog>https://raw.githubusercontent.com/wwkimball/yamlpath/master/CHANGES</changelog> + <doc>https://github.com/wwkimball/yamlpath/wiki</doc> + <remote-id type="pypi">yamlpath</remote-id> + <remote-id type="github">wwkimball/yamlpath</remote-id> + </upstream> + <maintainer type="person"> + <email>zmedico@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-python/yamlpath/yamlpath-3.6.0.ebuild b/dev-python/yamlpath/yamlpath-3.6.0.ebuild new file mode 100644 index 000000000000..ac88b3e28ffc --- /dev/null +++ b/dev-python/yamlpath/yamlpath-3.6.0.ebuild @@ -0,0 +1,56 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{8..10} ) +DISTUTILS_USE_SETUPTOOLS=rdepend + +inherit distutils-r1 + +DESCRIPTION="Command-line processors for YAML/JSON/Compatible data." +HOMEPAGE="https://github.com/wwkimball/yamlpath https://github.com/wwkimball/yamlpath/wiki" +SRC_URI="https://github.com/wwkimball/yamlpath/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="ISC" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" +RESTRICT="test" +RDEPEND=" + dev-python/ruamel-yaml[${PYTHON_USEDEP}] +" +BDEPEND=" + ${RDEPEND} + test? ( dev-python/pytest[${PYTHON_USEDEP}] ) +" + +python_prepare_all() { + local sed_args + + sed_args=( + -e 's|\("ruamel\.yaml\)[^"]*|\1|' + -e '/pytest-cov/d' + -e '/pytest-console-scripts/d' + ) + sed "${sed_args[@]}" -i setup.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + PYTHONPATH="${S}" py.test -v tests || die "Tests failed under ${EPYTHON}" +} + +yamlpath_post_src_install() { + local sitedir=$(python_get_sitedir) + [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory" + insinto "${sitedir}/yamlpath" + doins -r "${S}/yamlpath/patches" + python_optimize "${D}${sitedir}" || die +} + +src_install() { + find "${WORKDIR}" -name tests -print0 | xargs -0 rm -rf || die + distutils-r1_src_install + + python_foreach_impl yamlpath_post_src_install +} |