summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-07-25 09:55:35 +0200
committerMichał Górny <mgorny@gentoo.org>2020-07-25 10:31:23 +0200
commitf5718394d6d0ce746126782fdcb42759ad0177b4 (patch)
tree9539c2337b4a96ef572987e9a079f85376c36d87 /dev-python
parentwww-client/vivaldi-snapshot: Version 3.2.1967.30_p1 (diff)
downloadgentoo-f5718394d6d0ce746126782fdcb42759ad0177b4.tar.gz
gentoo-f5718394d6d0ce746126782fdcb42759ad0177b4.tar.bz2
gentoo-f5718394d6d0ce746126782fdcb42759ad0177b4.zip
dev-python/distlib: Call pypi-server as external executable
Call pypi-server as an external executable rather than via 'python -m'. This makes it possible to remove PYTHON_USEDEP, and clean py2 support from pypiserver. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/distlib/distlib-0.3.1.ebuild3
-rw-r--r--dev-python/distlib/files/distlib-0.3.1-system-pypiserver.py6
2 files changed, 5 insertions, 4 deletions
diff --git a/dev-python/distlib/distlib-0.3.1.ebuild b/dev-python/distlib/distlib-0.3.1.ebuild
index 349667d657a1..f82db5aa0028 100644
--- a/dev-python/distlib/distlib-0.3.1.ebuild
+++ b/dev-python/distlib/distlib-0.3.1.ebuild
@@ -21,10 +21,11 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
+# pypiserver is called as external executable
# openpyxl installs invalid metadata that breaks distlib
BDEPEND="
test? (
- dev-python/pypiserver[${PYTHON_USEDEP}]
+ dev-python/pypiserver
!!<dev-python/openpyxl-3.0.3[${PYTHON_USEDEP}]
)"
diff --git a/dev-python/distlib/files/distlib-0.3.1-system-pypiserver.py b/dev-python/distlib/files/distlib-0.3.1-system-pypiserver.py
index 44a7583968bd..beb0cd8dd925 100644
--- a/dev-python/distlib/files/distlib-0.3.1-system-pypiserver.py
+++ b/dev-python/distlib/files/distlib-0.3.1-system-pypiserver.py
@@ -1,4 +1,4 @@
-From 30b1b46cb02cef9cb0317a3500fd1497e594a797 Mon Sep 17 00:00:00 2001
+From f30a24d3dffee78cf0581218d9cca0e395b75f6a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Wed, 8 Jul 2020 09:24:42 +0200
Subject: [PATCH] Use system pypiserver
@@ -8,7 +8,7 @@ Subject: [PATCH] Use system pypiserver
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/tests/test_index.py b/tests/test_index.py
-index bc24367..623b027 100644
+index bc24367..4971e3f 100644
--- a/tests/test_index.py
+++ b/tests/test_index.py
@@ -52,11 +52,6 @@ class PackageIndexTestCase(unittest.TestCase):
@@ -28,7 +28,7 @@ index bc24367..623b027 100644
os.mkdir(pkgdir)
cls.sink = sink = open(os.devnull, 'w')
- cmd = [sys.executable, 'pypi-server-standalone.py',
-+ cmd = [sys.executable, '-m', 'pypiserver',
++ cmd = ['pypi-server',
'-P', 'passwords', 'packages']
cls.server = subprocess.Popen(cmd, stdout=sink, stderr=sink,
cwd=HERE)