commit:     f5718394d6d0ce746126782fdcb42759ad0177b4
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 25 07:55:35 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jul 25 08:31:23 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5718394

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 <AT> gentoo.org>

 dev-python/distlib/distlib-0.3.1.ebuild                     | 3 ++-
 dev-python/distlib/files/distlib-0.3.1-system-pypiserver.py | 6 +++---
 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 349667d657a..f82db5aa002 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 44a7583968b..beb0cd8dd92 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?= <[email protected]>
 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)

Reply via email to