summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-11-21 12:03:09 +0100
committerMichał Górny <mgorny@gentoo.org>2019-11-21 14:03:00 +0100
commita5f8ef84b915e94faa8157f0e411ed60aa74f4c0 (patch)
tree2a611607fd436a34a20bd39825c33aa951901716
parentdev-python/hypothesis: Bump to 4.45.1 (diff)
downloadgentoo-a5f8ef84b915e94faa8157f0e411ed60aa74f4c0.tar.gz
gentoo-a5f8ef84b915e94faa8157f0e411ed60aa74f4c0.tar.bz2
gentoo-a5f8ef84b915e94faa8157f0e411ed60aa74f4c0.zip
dev-python/argcomplete: Bump to 1.10.2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/argcomplete/Manifest1
-rw-r--r--dev-python/argcomplete/argcomplete-1.10.2.ebuild36
-rw-r--r--dev-python/argcomplete/files/argcomplete-1.10.2-test-pythonpath.patch39
3 files changed, 76 insertions, 0 deletions
diff --git a/dev-python/argcomplete/Manifest b/dev-python/argcomplete/Manifest
index fa173be36253..6e233b3ccb6b 100644
--- a/dev-python/argcomplete/Manifest
+++ b/dev-python/argcomplete/Manifest
@@ -1,3 +1,4 @@
DIST argcomplete-1.10.0.tar.gz 47271 BLAKE2B 78a67b56d4871120d7384459c8ee591f42dee195143712c5c70d144d4116041d36ba687d4425beba6258b58d5a0a3ef847d10d6267f372282f37e953c6f92d80 SHA512 59e9cb721ddffd85d9f6461a70d50f9ba0795e36044cd46fa5fe707fb1be28c12f4ef531d2844020efc156300861b2ca8b73f56a116dd54bda0e52cf68c0a411
+DIST argcomplete-1.10.2.tar.gz 50128 BLAKE2B 95a7f5a10b5d86e2b065b0d0563ff6281a5d6a0c9ea83b432492a00f67a1321c52cb9d5907868f36351f3057b21d215ab5a897a2ea7530d27925914a9e04eba8 SHA512 5e425f7ed042c429d8c01bdf11b6e721343229ec9fe0e3f9d4a6e49c40473a40286175a82f62530b822294e1fd8539e941c17673f2a0dd05216a243f1c2f4fce
DIST argcomplete-1.4.1.tar.gz 37219 BLAKE2B eff9c8b8a2996d2d57ca99516071a1c831f9e64be4efd72bf930dfe7fb2404db2aa03546e761ae73b5d22f8ebe683728c433ab837eee5c073616e7d32fa32010 SHA512 3e9fa64fca93baf14fddd653947ff0269004e8783de0567931dafb9e4d0dfff2e2450ef6df331a4d648f5ce1d817a422f52d8d30b94315cd54fd82102467ded5
DIST argcomplete-1.9.4.tar.gz 47471 BLAKE2B ba64acc1fb2ae336166504db3dd991227c4e2a04abc6909ecf6723c1d2ce82ea65453ca2dde97316da9eaaa5b60026a6c8e4f3d658f1ed8122ca4fd00723fca1 SHA512 831958dffc75c65e2a63918d1e6f5e1fa47ec753b913c978e8d1d30d430ab8fedf66c99d8df23b2abc547b42c27335ccf47811224322994316ca2225c85ce346
diff --git a/dev-python/argcomplete/argcomplete-1.10.2.ebuild b/dev-python/argcomplete/argcomplete-1.10.2.ebuild
new file mode 100644
index 000000000000..b4d81cae4366
--- /dev/null
+++ b/dev-python/argcomplete/argcomplete-1.10.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7,3_8} pypy pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Bash tab completion for argparse"
+HOMEPAGE="https://pypi.org/project/argcomplete/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+# pip is called as an external tool
+BDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ app-shells/fish
+ app-shells/tcsh
+ dev-python/pexpect[${PYTHON_USEDEP}]
+ dev-python/pip
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/argcomplete-1.10.2-test-pythonpath.patch
+)
+
+python_test() {
+ "${EPYTHON}" test/test.py -v || die
+}
diff --git a/dev-python/argcomplete/files/argcomplete-1.10.2-test-pythonpath.patch b/dev-python/argcomplete/files/argcomplete-1.10.2-test-pythonpath.patch
new file mode 100644
index 000000000000..18bd22cf1893
--- /dev/null
+++ b/dev-python/argcomplete/files/argcomplete-1.10.2-test-pythonpath.patch
@@ -0,0 +1,39 @@
+From 003cc45b1fa45c766e38c3230423a5662a00d371 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 21 Nov 2019 11:29:41 +0100
+Subject: [PATCH] Prepend to PYTHONPATH in test_console_script* instead of
+ replacing
+
+Modify _test_console_script() to prepend to PYTHONPATH instead of
+overwriting its value. This is necessary so that it is able to find
+just-built version of argcomplete that is provided via PYTHONPATH
+(vs requiring it to be installed in system-wide directory prior).
+
+Otherwise, the tests are failing:
+
+ Traceback (most recent call last):
+ File "./bin/test-package", line 5, in <module>
+ from test_package import main
+ File "/tmp/argcomplete/test_dir_pychyg9vqx/test_package/__init__.py", line 4, in <module>
+ import argcomplete
+ ModuleNotFoundError: No module named 'argcomplete'
+---
+ test/test.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/test.py b/test/test.py
+index 98da760..ddf5a03 100755
+--- a/test/test.py
++++ b/test/test.py
+@@ -1185,7 +1185,7 @@ class TestBashGlobal(TestBash):
+ with TempDir(prefix='test_dir_py', dir='.'):
+ self.sh.run_command('cd ' + os.getcwd())
+ self.sh.run_command('export PATH=$PATH:./bin')
+- self.sh.run_command('export PYTHONPATH=.')
++ self.sh.run_command('export PYTHONPATH=.:$PYTHONPATH')
+ test_package = os.path.join(TEST_DIR, 'test_package')
+ command = 'pip install {} --target .'.format(test_package)
+ if not wheel:
+--
+2.24.0
+