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>
This commit is contained in:
Michał Górny
2020-07-25 10:31:23 +02:00
parent eb22891d4d
commit f5718394d6
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -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}]
)"
@@ -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)