diff options
Diffstat (limited to 'app-misc/jpipe/jpipe-0.1.3.4.ebuild')
-rw-r--r-- | app-misc/jpipe/jpipe-0.1.3.4.ebuild | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/app-misc/jpipe/jpipe-0.1.3.4.ebuild b/app-misc/jpipe/jpipe-0.1.3.4.ebuild new file mode 100644 index 000000000000..d40453fbf158 --- /dev/null +++ b/app-misc/jpipe/jpipe-0.1.3.4.ebuild @@ -0,0 +1,42 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +DISTUTILS_USE_SETUPTOOLS=rdepend +PYTHON_COMPAT=( python3_{7,8,9} ) + +inherit distutils-r1 + +DESCRIPTION="A python implementation of the jp CLI for JMESPath" +HOMEPAGE="https://github.com/pipebus/jpipe https://github.com/jmespath/jmespath.py/pull/224" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="Apache-2.0" +KEYWORDS="~amd64" +SLOT="0" +IUSE="jpp jp-symlink test" +RESTRICT="!test? ( test )" +RDEPEND=" + jpp? ( !app-misc/jp[jpp] ) + jp-symlink? ( !app-misc/jp[jp] ) + dev-python/jmespath[${PYTHON_USEDEP}] +" + +python_prepare_all() { + if ! use jpp; then + sed -e '/jpp_main/d' -i setup.py || die + fi + distutils-r1_python_prepare_all +} + +python_test() { + "${PYTHON}" test/test_jpipe.py || die "tests failed for ${EPYTHON}" + if use jpp; then + "${PYTHON}" test/test_jpp.py || die "jpp tests failed for ${EPYTHON}" + fi +} + +src_install() { + distutils-r1_src_install + use jp-symlink && dosym jpipe /usr/bin/jp +} |