summaryrefslogtreecommitdiff
path: root/dev-python/distlib
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-python/distlib
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-python/distlib')
-rw-r--r--dev-python/distlib/Manifest5
-rw-r--r--dev-python/distlib/distlib-0.3.0.ebuild54
-rw-r--r--dev-python/distlib/distlib-0.3.1.ebuild52
-rw-r--r--dev-python/distlib/files/distlib-0.3.1-system-pypiserver.py37
4 files changed, 92 insertions, 56 deletions
diff --git a/dev-python/distlib/Manifest b/dev-python/distlib/Manifest
index 8ced9bbba543..e1787ba40578 100644
--- a/dev-python/distlib/Manifest
+++ b/dev-python/distlib/Manifest
@@ -1,3 +1,4 @@
-DIST distlib-0.3.0.tar.bz2 848089 BLAKE2B 70f88b570229e2ab4c95bd8da0375aba189f66dec8defcf8eedf1be6924d93bd20b54c68e5fba867a6c68a31d4ef926ee2dc18ccb0391278680f30a62d0cd251 SHA512 01b0e7d59736414a241efdf883e4ee63eafe9614ce3b4147781a5750d25d6383543146c5277e3e0d3e11ce03693afd0331c6e3416776a6f84de7a4d9dadf3de4
-EBUILD distlib-0.3.0.ebuild 1574 BLAKE2B a4cc5c704c5c568d8ea95c5a9bc152474e1114843b796e7b75c57b313178895d5a6617b879608088481420a1030f52fd25142f4c057157809b3ac327ef0f471d SHA512 594ef111c28ded89a86a2c79a28a38ecc0f78ae96141c992ad0e61cc233d3197bac7e4dfea2d3c3c1665ff307f54d34179a28b481a1646c1fe2378d23d7765bb
+AUX distlib-0.3.1-system-pypiserver.py 1532 BLAKE2B 7bb2bbb2282bcaa943735804428b00f6c51fdb51c7acaec7efe653495acd9194a0544d5d49531a96ab269ab8a61ba87e3c35d4f30ce5275a0a284fadd88cc19f SHA512 b96579d450c5c33502edc57480d5bb00aa3b9b61333c43ab446a3cf7117934a6a14026b2061cbf28e69e88a515554f8a1aad732f685cb73f18686b1aba6379ab
+DIST distlib-0.3.1.tar.bz2 1068500 BLAKE2B 52135869242f71cc6d6887da6d9e20ffc6b46c84d8146393961062d92d8c0bd68e1309277f64fdec0319ff3c503b1caaba3d5378f5c081dca79573c8d9c2e6f2 SHA512 f259299176c45be7024b80759015a2fad120ffdde55b6abea0f7fb0335cee90809b5daedcb88abdfb68fd496284b2e478df622004b3750327bfc86807581116c
+EBUILD distlib-0.3.1.ebuild 1325 BLAKE2B c4f5f25465a310357b30d655890caec24b4fc9490a30f30d2bf3c829deb8c0d3df4d7afc86ba89fad782c64d174cf56483c397542cbc4b259c996a6f109a9af5 SHA512 8339b311f87979382995d1669e7f5220106b6a282c20f5bc75b6a847e709d8ef9b098088b92b84ef108e6ad6cf3606362df68704717fc13f607f9ff3a18a66d2
MISC metadata.xml 218 BLAKE2B 086fdcf7b63ca7bd6c58e861d717bb375e1cd372eff26d5d2eeeb176d8c5e6f10e653562abafb50eae7d7508f8e3d421b87e6a749acd0490308672828d0da697 SHA512 4558fee4c51117e21b1f42ca3edbdf1195ed297db798d6bfa0e5fbb7019654a187422b0abde7af5d800caffed66d1e55e4280e8be602bad591424d9776c46781
diff --git a/dev-python/distlib/distlib-0.3.0.ebuild b/dev-python/distlib/distlib-0.3.0.ebuild
deleted file mode 100644
index 10062678328e..000000000000
--- a/dev-python/distlib/distlib-0.3.0.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_USE_SETUPTOOLS=no
-PYTHON_COMPAT=( python{2_7,3_{6,7,8,9}} pypy3 )
-
-inherit distutils-r1 vcs-snapshot
-
-DESCRIPTION="Low-level components of distutils2/packaging"
-HOMEPAGE="https://pypi.org/project/distlib/
- https://bitbucket.org/pypa/distlib/"
-# pypi has zip only :-(
-SRC_URI="
- https://bitbucket.org/pypa/distlib/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
-
-LICENSE="PSF-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-
-distutils_enable_tests setup.py
-
-src_prepare() {
- # this test assumes pristine venv with no system packages
- sed -e 's:test_dependency_finder:_&:' \
- -i tests/test_locators.py || die
- # no clue but it looks horribly fragile
- sed -e 's:test_sequencer_basic:_&:' \
- -i tests/test_util.py || die
- # progress bar test cases, very fragile
- sed -e '/ProgressTestCase/s:unittest.TestCase:object:' \
- -i tests/test_util.py || die
- # TODO: investigate
- sed -e 's:test_upload:_&:' \
- -i tests/test_index.py || die
- # these require Internet
- sed -e 's:test_search:_&:' \
- -i tests/test_index.py || die
- sed -e 's:test_aggregation:_&:' \
- -e 's:test_all:_&:' \
- -e 's:test_dist_reqts:_&:' \
- -e 's:test_json:_&:' \
- -e 's:test_prereleases:_&:' \
- -e 's:test_scraper:_&:' \
- -i tests/test_locators.py || die
- sed -e 's:test_package_data:_&:' \
- -i tests/test_util.py || die
- # doesn't work with our patched pip
- sed -e '/PIP_AVAIL/s:True:False:' \
- -i tests/test_wheel.py || die
-
- distutils-r1_src_prepare
-}
diff --git a/dev-python/distlib/distlib-0.3.1.ebuild b/dev-python/distlib/distlib-0.3.1.ebuild
new file mode 100644
index 000000000000..f82db5aa0028
--- /dev/null
+++ b/dev-python/distlib/distlib-0.3.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_SETUPTOOLS=no
+PYTHON_COMPAT=( python{2_7,3_{6,7,8,9}} pypy3 )
+
+inherit distutils-r1 vcs-snapshot
+
+DESCRIPTION="Low-level components of distutils2/packaging"
+HOMEPAGE="https://pypi.org/project/distlib/
+ https://bitbucket.org/pypa/distlib/"
+# pypi has zip only :-(
+SRC_URI="
+ https://bitbucket.org/pypa/distlib/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
+
+LICENSE="PSF-2"
+SLOT="0"
+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
+ !!<dev-python/openpyxl-3.0.3[${PYTHON_USEDEP}]
+ )"
+
+src_prepare() {
+ # make sure they're not used
+ rm -r tests/unittest2 || die
+ rm tests/pypi-server-standalone.py || die
+
+ # use system pypiserver instead of broken bundled one
+ eapply "${FILESDIR}"/distlib-0.3.1-system-pypiserver.py || die
+
+ # doesn't work with our patched pip
+ sed -e '/PIP_AVAIL/s:True:False:' \
+ -i tests/test_wheel.py || die
+
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ local -x SKIP_ONLINE=1
+ local -x PYTHONHASHSEED=0
+ "${EPYTHON}" tests/test_all.py -v ||
+ die "Tests failed with ${EPYTHON}"
+}
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
new file mode 100644
index 000000000000..beb0cd8dd925
--- /dev/null
+++ b/dev-python/distlib/files/distlib-0.3.1-system-pypiserver.py
@@ -0,0 +1,37 @@
+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
+
+---
+ tests/test_index.py | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/tests/test_index.py b/tests/test_index.py
+index bc24367..4971e3f 100644
+--- a/tests/test_index.py
++++ b/tests/test_index.py
+@@ -52,11 +52,6 @@ class PackageIndexTestCase(unittest.TestCase):
+ def setUpClass(cls):
+ if cls.run_test_server:
+ cls.server = None
+- server_script = os.path.join(HERE, 'pypi-server-standalone.py')
+- if not os.path.exists(server_script):
+- logger.debug('test server not available - some tests '
+- 'will be skipped.')
+- return
+ pwdfn = os.path.join(HERE, 'passwords')
+ if not os.path.exists(pwdfn): # pragma: no cover
+ with open(pwdfn, 'w') as f:
+@@ -65,7 +60,7 @@ class PackageIndexTestCase(unittest.TestCase):
+ if not os.path.isdir(pkgdir): # pragma: no cover
+ os.mkdir(pkgdir)
+ cls.sink = sink = open(os.devnull, 'w')
+- cmd = [sys.executable, 'pypi-server-standalone.py',
++ cmd = ['pypi-server',
+ '-P', 'passwords', 'packages']
+ cls.server = subprocess.Popen(cmd, stdout=sink, stderr=sink,
+ cwd=HERE)
+--
+2.27.0
+