diff options
author | Zac Medico <zmedico@gentoo.org> | 2021-09-15 16:35:46 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2021-09-15 16:36:40 -0700 |
commit | 83d255cc5a5cb7ea9ec6640fa949f57669789021 (patch) | |
tree | 13e851f4a8314d4d6decbd2327cd80c2aafc3c86 /dev-python/yamlpath/yamlpath-3.6.1.ebuild | |
parent | media-tv/plex-media-server: remove old version 1.24.0.4930 (diff) | |
download | gentoo-83d255cc5a5cb7ea9ec6640fa949f57669789021.tar.gz gentoo-83d255cc5a5cb7ea9ec6640fa949f57669789021.tar.bz2 gentoo-83d255cc5a5cb7ea9ec6640fa949f57669789021.zip |
dev-python/yamlpath: Bump to version 3.6.1
Package-Manager: Portage-3.0.23, Repoman-3.0.3
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'dev-python/yamlpath/yamlpath-3.6.1.ebuild')
-rw-r--r-- | dev-python/yamlpath/yamlpath-3.6.1.ebuild | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/dev-python/yamlpath/yamlpath-3.6.1.ebuild b/dev-python/yamlpath/yamlpath-3.6.1.ebuild new file mode 100644 index 000000000000..075879b08bcb --- /dev/null +++ b/dev-python/yamlpath/yamlpath-3.6.1.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=bdepend + +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 +} |