summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Grozin <grozin@gentoo.org>2021-03-15 23:09:46 +0700
committerAndrey Grozin <grozin@gentoo.org>2021-03-15 23:09:46 +0700
commit463af6f5f6ebbeb178e05a9326ba9a4f8ab3c21a (patch)
tree9db078f15547d1f7fcdbe2b80dba4a1e6c7f74b6 /dev-python/plumbum
parentkde-frameworks/kio: Drop 5.80.0 (diff)
downloadgentoo-463af6f5f6ebbeb178e05a9326ba9a4f8ab3c21a.tar.gz
gentoo-463af6f5f6ebbeb178e05a9326ba9a4f8ab3c21a.tar.bz2
gentoo-463af6f5f6ebbeb178e05a9326ba9a4f8ab3c21a.zip
dev-python/plumbum: BDEPEND on psutil if test?
Closes: https://bugs.gentoo.org/776349 Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Andrey Grozin <grozin@gentoo.org>
Diffstat (limited to 'dev-python/plumbum')
-rw-r--r--dev-python/plumbum/plumbum-1.7.0-r1.ebuild40
1 files changed, 40 insertions, 0 deletions
diff --git a/dev-python/plumbum/plumbum-1.7.0-r1.ebuild b/dev-python/plumbum/plumbum-1.7.0-r1.ebuild
new file mode 100644
index 000000000000..98a802724ef7
--- /dev/null
+++ b/dev-python/plumbum/plumbum-1.7.0-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{7..9} )
+inherit distutils-r1 optfeature
+
+DESCRIPTION="A library for shell script-like programs in python"
+HOMEPAGE="https://plumbum.readthedocs.io/en/latest/ https://github.com/tomerfiliba/plumbum"
+SRC_URI="https://files.pythonhosted.org/packages/ed/ba/431d7f420cd93c4b8ccb15ed8f1c6c76c81965634fd70345af0b19c2b7bc/${P}.tar.gz"
+BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( dev-python/psutil[${PYTHON_USEDEP}] )"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+PATCHES=( "${FILESDIR}"/${PN}-1.7.0-test.patch )
+distutils_enable_tests pytest
+
+src_prepare() {
+ distutils-r1_src_prepare
+
+ # Need sshd running
+ rm tests/test_remote.py || die "rm test_remote.py failed"
+ rm tests/test_utils.py || die "rm test_utils.py failed"
+ rm tests/_test_paramiko.py || die "rm _test_paramiko.py failed"
+ # Windows specific
+ rm tests/test_putty.py || die "rm test_putty.py failed"
+ # Needs sudo without password
+ rm tests/test_sudo.py || die "rm test_sudo.py failed"
+}
+
+pkg_postinst() {
+ elog "To get additional features, optional runtime dependencies may be installed:"
+ optfeature "Remote commands via ssh" dev-python/paramiko
+ optfeature "Progress bars in jupyter" dev-python/ipywidgets
+ optfeature "Colored output in jupyter" dev-python/ipython
+ optfeature "Images on the command line" dev-python/pillow
+ elog ""
+}