[gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/, dev-python/distlib/files/

2023-12-30 Thread Michał Górny
commit: bd034a0aaae2a14957e4605b074ed4c775d01c94
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Dec 30 14:18:10 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Dec 30 14:32:44 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd034a0a

dev-python/distlib: Remove old

Signed-off-by: Michał Górny  gentoo.org>

 dev-python/distlib/Manifest|  1 -
 dev-python/distlib/distlib-0.3.7.ebuild| 59 --
 dev-python/distlib/files/distlib-0.3.7-pypy3.patch | 13 -
 3 files changed, 73 deletions(-)

diff --git a/dev-python/distlib/Manifest b/dev-python/distlib/Manifest
index 977883d8a667..ce4b0127b663 100644
--- a/dev-python/distlib/Manifest
+++ b/dev-python/distlib/Manifest
@@ -1,2 +1 @@
-DIST distlib-0.3.7.gh.tar.gz 1240451 BLAKE2B 
2050133ae1f57a2b37013e0e49a22903a816377d111e6a35c57084e2dd7877b41e9625e3cccbc9e67c35239814b835b064f94eec8bcd41dedd7d329f9d5be2ec
 SHA512 
33806fd953c4b185eaa69c7d0f0cdad9ea71be73d26f0585cefd4a332edbcc3c6287b3bce024858d5d15626311f2567474b19b6366f80b2336d9b39691c6fe31
 DIST distlib-0.3.8.gh.tar.gz 1240659 BLAKE2B 
5d14440bd6886a37e80323ea35370f306135f5b15544180b072ed42c6e7b00799dc4b5fe207adb31eee7234d4f291420bd289b5430bbf38ff0468b29af2ca621
 SHA512 
98dc6459f54783598aad8ee3b8d80c0092a5d08d4272ad212faeef5e30cf9029b718231681f39d26e48588bb676bae7919f1431ddb51eb3917725f99a5c90457

diff --git a/dev-python/distlib/distlib-0.3.7.ebuild 
b/dev-python/distlib/distlib-0.3.7.ebuild
deleted file mode 100644
index 55efadc48c14..
--- a/dev-python/distlib/distlib-0.3.7.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 2021-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Low-level components of distutils2/packaging"
-HOMEPAGE="
-   https://pypi.org/project/distlib/
-   https://github.com/pypa/distlib
-"
-SRC_URI="
-   https://github.com/pypa/distlib/archive/${PV}.tar.gz -> ${P}.gh.tar.gz
-"
-
-LICENSE="PSF-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86 ~x64-macos"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-# pypiserver is called as external executable
-BDEPEND="
-   test? (
-   dev-python/pypiserver
-   )
-"
-
-src_prepare() {
-   local PATCHES=(
-   # use system pypiserver instead of bundled one
-   "${FILESDIR}"/distlib-0.3.2-system-pypiserver.py
-   # fix pypy3
-   # https://github.com/pypa/distlib/issues/204
-   "${FILESDIR}"/${P}-pypy3.patch
-   )
-
-   # make sure they're not used
-   rm tests/pypi-server-standalone.py || die
-
-   distutils-r1_src_prepare
-}
-
-python_test() {
-   local -x SKIP_ONLINE=1
-   local -x PYTHONHASHSEED=0
-
-   # disable system-site-packages -- distlib has no deps, and is very
-   # fragile to packages actually installed on the system
-   sed -i -e '/system-site-packages/s:true:false:' \
-   "${BUILD_DIR}/install${EPREFIX}/usr/bin/pyvenv.cfg" || die
-
-   "${EPYTHON}" tests/test_all.py -v -x ||
-   die "Tests failed with ${EPYTHON}"
-}

diff --git a/dev-python/distlib/files/distlib-0.3.7-pypy3.patch 
b/dev-python/distlib/files/distlib-0.3.7-pypy3.patch
deleted file mode 100644
index eeb1a924069e..
--- a/dev-python/distlib/files/distlib-0.3.7-pypy3.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/tests/test_scripts.py b/tests/test_scripts.py
-index 9ec1d43..2fc18ae 100644
 a/tests/test_scripts.py
-+++ b/tests/test_scripts.py
-@@ -112,7 +112,7 @@ class ScriptTestCase(DistlibTestCase):
- bindir = os.path.join(dstdir, 'bin')
- maker = ScriptMaker(self.maker.source_dir, bindir,
- add_launchers=False)
--venv.create(dstdir)
-+venv.create(dstdir, symlinks=True)
- maker.executable = os.path.join(bindir, 'python')
- filenames = maker.make('script8.py')
- p = subprocess.Popen(filenames[0], shell=True,



[gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/, dev-python/distlib/files/

2023-08-19 Thread Michał Górny
commit: 1922813dcd8e43e94627300b84205029fc386675
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Aug 19 15:56:54 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Aug 19 16:05:15 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1922813d

dev-python/distlib: Remove old

Signed-off-by: Michał Górny  gentoo.org>

 dev-python/distlib/Manifest|  1 -
 dev-python/distlib/distlib-0.3.6.ebuild| 58 --
 dev-python/distlib/files/distlib-0.3.6-py312.patch | 50 ---
 3 files changed, 109 deletions(-)

diff --git a/dev-python/distlib/Manifest b/dev-python/distlib/Manifest
index 49c37a1cf363..935acdf8925a 100644
--- a/dev-python/distlib/Manifest
+++ b/dev-python/distlib/Manifest
@@ -1,2 +1 @@
-DIST distlib-0.3.6.gh.tar.gz 1234082 BLAKE2B 
384b736d9fb9e63d1b9a9375caf972ddfccb36c99903928505e684fe09b30190f873cf7b109beb6c32a1e4b1e11a1d9947adea74f9dceef3398fcc1963a2044a
 SHA512 
39948539764ff5d45f14dc602ebd47d523b71b587ee081d7a267669aef4e4b1013d3995cb992038136bc4c01826ea633c6e4ffd050f1511705b296bf76f3bbf9
 DIST distlib-0.3.7.gh.tar.gz 1240451 BLAKE2B 
2050133ae1f57a2b37013e0e49a22903a816377d111e6a35c57084e2dd7877b41e9625e3cccbc9e67c35239814b835b064f94eec8bcd41dedd7d329f9d5be2ec
 SHA512 
33806fd953c4b185eaa69c7d0f0cdad9ea71be73d26f0585cefd4a332edbcc3c6287b3bce024858d5d15626311f2567474b19b6366f80b2336d9b39691c6fe31

diff --git a/dev-python/distlib/distlib-0.3.6.ebuild 
b/dev-python/distlib/distlib-0.3.6.ebuild
deleted file mode 100644
index 2fb434b9de26..
--- a/dev-python/distlib/distlib-0.3.6.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 2021-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Low-level components of distutils2/packaging"
-HOMEPAGE="
-   https://pypi.org/project/distlib/
-   https://github.com/pypa/distlib
-"
-SRC_URI="
-   https://github.com/pypa/distlib/archive/${PV}.tar.gz -> ${P}.gh.tar.gz
-"
-
-LICENSE="PSF-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86 ~x64-macos"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-# pypiserver is called as external executable
-BDEPEND="
-   test? (
-   dev-python/pypiserver
-   )
-"
-
-src_prepare() {
-   local PATCHES=(
-   "${FILESDIR}/${P}-py312.patch"
-
-   # use system pypiserver instead of bundled one
-   "${FILESDIR}"/distlib-0.3.2-system-pypiserver.py
-   )
-
-   # make sure they're not used
-   rm tests/pypi-server-standalone.py || die
-
-   distutils-r1_src_prepare
-}
-
-python_test() {
-   local -x SKIP_ONLINE=1
-   local -x PYTHONHASHSEED=0
-
-   # disable system-site-packages -- distlib has no deps, and is very
-   # fragile to packages actually installed on the system
-   sed -i -e '/system-site-packages/s:true:false:' \
-   "${BUILD_DIR}/install${EPREFIX}/usr/bin/pyvenv.cfg" || die
-
-   "${EPYTHON}" tests/test_all.py -v -x ||
-   die "Tests failed with ${EPYTHON}"
-}

diff --git a/dev-python/distlib/files/distlib-0.3.6-py312.patch 
b/dev-python/distlib/files/distlib-0.3.6-py312.patch
deleted file mode 100644
index 4e1d8927b745..
--- a/dev-python/distlib/files/distlib-0.3.6-py312.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From fe769c72e4f9d613b2ce066325d2fb28317833d5 Mon Sep 17 00:00:00 2001
-From: Lumir Balhar 
-Date: Thu, 18 May 2023 14:09:34 +0200
-Subject: [PATCH 1/2] Check for cert_file attribute before accessing it
-
-In Python 3.12, HTTPSConnection no longer has cert_file attribute
-so unless something adds it to the subclass, the attribute doesn't
-exist by default.
-
-CPython change: 
https://github.com/python/cpython/commit/ef0e72b31d22f780d3a165d7d0471806061fe380#diff-3cf29d90eb758d0fe5ec013bbfda9b0bb60be4f7d899583bd5f490a7a5a5dc5f

- distlib/util.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/distlib/util.py b/distlib/util.py
-index dd01849..ddfc992 100644
 a/distlib/util.py
-+++ b/distlib/util.py
-@@ -1435,7 +1435,7 @@ def connect(self):
- context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
- if hasattr(ssl, 'OP_NO_SSLv2'):
- context.options |= ssl.OP_NO_SSLv2
--if self.cert_file:
-+if hasattr(self, "cert_file") and self.cert_file:
- context.load_cert_chain(self.cert_file, self.key_file)
- kwargs = {}
- if self.ca_certs:
-
-From 440a7b57b9521ba2eca749e26945eaf16bc7c472 Mon Sep 17 00:00:00 2001
-From: Vinay Sajip 
-Date: Wed, 24 May 2023 15:50:44 +0100
-Subject: [PATCH 2/2] Use single quotes.
-

- distlib/util.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/distlib/util.py 

[gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/, dev-python/distlib/files/

2023-07-18 Thread Michał Górny
commit: 189f5f9f5eb6596cce92489fe94b96f68b0243fb
Author: Michał Górny  gentoo  org>
AuthorDate: Tue Jul 18 05:37:21 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Tue Jul 18 06:03:02 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=189f5f9f

dev-python/distlib: Bump to 0.3.7

Signed-off-by: Michał Górny  gentoo.org>

 dev-python/distlib/Manifest|  1 +
 dev-python/distlib/distlib-0.3.7.ebuild| 59 ++
 dev-python/distlib/files/distlib-0.3.7-pypy3.patch | 13 +
 3 files changed, 73 insertions(+)

diff --git a/dev-python/distlib/Manifest b/dev-python/distlib/Manifest
index 8b5f107343c5..49c37a1cf363 100644
--- a/dev-python/distlib/Manifest
+++ b/dev-python/distlib/Manifest
@@ -1 +1,2 @@
 DIST distlib-0.3.6.gh.tar.gz 1234082 BLAKE2B 
384b736d9fb9e63d1b9a9375caf972ddfccb36c99903928505e684fe09b30190f873cf7b109beb6c32a1e4b1e11a1d9947adea74f9dceef3398fcc1963a2044a
 SHA512 
39948539764ff5d45f14dc602ebd47d523b71b587ee081d7a267669aef4e4b1013d3995cb992038136bc4c01826ea633c6e4ffd050f1511705b296bf76f3bbf9
+DIST distlib-0.3.7.gh.tar.gz 1240451 BLAKE2B 
2050133ae1f57a2b37013e0e49a22903a816377d111e6a35c57084e2dd7877b41e9625e3cccbc9e67c35239814b835b064f94eec8bcd41dedd7d329f9d5be2ec
 SHA512 
33806fd953c4b185eaa69c7d0f0cdad9ea71be73d26f0585cefd4a332edbcc3c6287b3bce024858d5d15626311f2567474b19b6366f80b2336d9b39691c6fe31

diff --git a/dev-python/distlib/distlib-0.3.7.ebuild 
b/dev-python/distlib/distlib-0.3.7.ebuild
new file mode 100644
index ..8d237a4bfc38
--- /dev/null
+++ b/dev-python/distlib/distlib-0.3.7.ebuild
@@ -0,0 +1,59 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Low-level components of distutils2/packaging"
+HOMEPAGE="
+   https://pypi.org/project/distlib/
+   https://github.com/pypa/distlib
+"
+SRC_URI="
+   https://github.com/pypa/distlib/archive/${PV}.tar.gz -> ${P}.gh.tar.gz
+"
+
+LICENSE="PSF-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~x64-macos"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+# pypiserver is called as external executable
+BDEPEND="
+   test? (
+   dev-python/pypiserver
+   )
+"
+
+src_prepare() {
+   local PATCHES=(
+   # use system pypiserver instead of bundled one
+   "${FILESDIR}"/distlib-0.3.2-system-pypiserver.py
+   # fix pypy3
+   # https://github.com/pypa/distlib/issues/204
+   "${FILESDIR}"/${P}-pypy3.patch
+   )
+
+   # make sure they're not used
+   rm tests/pypi-server-standalone.py || die
+
+   distutils-r1_src_prepare
+}
+
+python_test() {
+   local -x SKIP_ONLINE=1
+   local -x PYTHONHASHSEED=0
+
+   # disable system-site-packages -- distlib has no deps, and is very
+   # fragile to packages actually installed on the system
+   sed -i -e '/system-site-packages/s:true:false:' \
+   "${BUILD_DIR}/install${EPREFIX}/usr/bin/pyvenv.cfg" || die
+
+   "${EPYTHON}" tests/test_all.py -v -x ||
+   die "Tests failed with ${EPYTHON}"
+}

diff --git a/dev-python/distlib/files/distlib-0.3.7-pypy3.patch 
b/dev-python/distlib/files/distlib-0.3.7-pypy3.patch
new file mode 100644
index ..eeb1a924069e
--- /dev/null
+++ b/dev-python/distlib/files/distlib-0.3.7-pypy3.patch
@@ -0,0 +1,13 @@
+diff --git a/tests/test_scripts.py b/tests/test_scripts.py
+index 9ec1d43..2fc18ae 100644
+--- a/tests/test_scripts.py
 b/tests/test_scripts.py
+@@ -112,7 +112,7 @@ class ScriptTestCase(DistlibTestCase):
+ bindir = os.path.join(dstdir, 'bin')
+ maker = ScriptMaker(self.maker.source_dir, bindir,
+ add_launchers=False)
+-venv.create(dstdir)
++venv.create(dstdir, symlinks=True)
+ maker.executable = os.path.join(bindir, 'python')
+ filenames = maker.make('script8.py')
+ p = subprocess.Popen(filenames[0], shell=True,



[gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/, dev-python/distlib/files/

2023-05-24 Thread Michał Górny
commit: 4b7bae6873a5b1f9be36a9d5c2226e92f2a14dd8
Author: Michał Górny  gentoo  org>
AuthorDate: Wed May 24 15:18:58 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed May 24 15:18:58 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b7bae68

dev-python/distlib: Enable py3.12

Signed-off-by: Michał Górny  gentoo.org>

 dev-python/distlib/distlib-0.3.6.ebuild| 12 --
 dev-python/distlib/files/distlib-0.3.6-py312.patch | 50 ++
 2 files changed, 58 insertions(+), 4 deletions(-)

diff --git a/dev-python/distlib/distlib-0.3.6.ebuild 
b/dev-python/distlib/distlib-0.3.6.ebuild
index 6f1be5b2fb7b..2fb434b9de26 100644
--- a/dev-python/distlib/distlib-0.3.6.ebuild
+++ b/dev-python/distlib/distlib-0.3.6.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..11} pypy3 )
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
 
 inherit distutils-r1
 
@@ -31,12 +31,16 @@ BDEPEND="
 "
 
 src_prepare() {
+   local PATCHES=(
+   "${FILESDIR}/${P}-py312.patch"
+
+   # use system pypiserver instead of bundled one
+   "${FILESDIR}"/distlib-0.3.2-system-pypiserver.py
+   )
+
# make sure they're not used
rm tests/pypi-server-standalone.py || die
 
-   # use system pypiserver instead of broken bundled one
-   eapply "${FILESDIR}"/distlib-0.3.2-system-pypiserver.py || die
-
distutils-r1_src_prepare
 }
 

diff --git a/dev-python/distlib/files/distlib-0.3.6-py312.patch 
b/dev-python/distlib/files/distlib-0.3.6-py312.patch
new file mode 100644
index ..4e1d8927b745
--- /dev/null
+++ b/dev-python/distlib/files/distlib-0.3.6-py312.patch
@@ -0,0 +1,50 @@
+From fe769c72e4f9d613b2ce066325d2fb28317833d5 Mon Sep 17 00:00:00 2001
+From: Lumir Balhar 
+Date: Thu, 18 May 2023 14:09:34 +0200
+Subject: [PATCH 1/2] Check for cert_file attribute before accessing it
+
+In Python 3.12, HTTPSConnection no longer has cert_file attribute
+so unless something adds it to the subclass, the attribute doesn't
+exist by default.
+
+CPython change: 
https://github.com/python/cpython/commit/ef0e72b31d22f780d3a165d7d0471806061fe380#diff-3cf29d90eb758d0fe5ec013bbfda9b0bb60be4f7d899583bd5f490a7a5a5dc5f
+---
+ distlib/util.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/distlib/util.py b/distlib/util.py
+index dd01849..ddfc992 100644
+--- a/distlib/util.py
 b/distlib/util.py
+@@ -1435,7 +1435,7 @@ def connect(self):
+ context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
+ if hasattr(ssl, 'OP_NO_SSLv2'):
+ context.options |= ssl.OP_NO_SSLv2
+-if self.cert_file:
++if hasattr(self, "cert_file") and self.cert_file:
+ context.load_cert_chain(self.cert_file, self.key_file)
+ kwargs = {}
+ if self.ca_certs:
+
+From 440a7b57b9521ba2eca749e26945eaf16bc7c472 Mon Sep 17 00:00:00 2001
+From: Vinay Sajip 
+Date: Wed, 24 May 2023 15:50:44 +0100
+Subject: [PATCH 2/2] Use single quotes.
+
+---
+ distlib/util.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/distlib/util.py b/distlib/util.py
+index ddfc992..d1ec58a 100644
+--- a/distlib/util.py
 b/distlib/util.py
+@@ -1435,7 +1435,7 @@ def connect(self):
+ context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
+ if hasattr(ssl, 'OP_NO_SSLv2'):
+ context.options |= ssl.OP_NO_SSLv2
+-if hasattr(self, "cert_file") and self.cert_file:
++if hasattr(self, 'cert_file') and self.cert_file:
+ context.load_cert_chain(self.cert_file, self.key_file)
+ kwargs = {}
+ if self.ca_certs:



[gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/, dev-python/distlib/files/

2022-01-08 Thread Michał Górny
commit: 1cf41a1a291f0ac3250c12710fe6dca279591346
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Jan  8 18:22:01 2022 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Jan  8 18:22:01 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cf41a1a

dev-python/distlib: Remove old

Signed-off-by: Michał Górny  gentoo.org>

 dev-python/distlib/Manifest|  1 -
 dev-python/distlib/distlib-0.3.2.ebuild| 56 --
 dev-python/distlib/files/distlib-0.3.2-py310.patch | 29 ---
 3 files changed, 86 deletions(-)

diff --git a/dev-python/distlib/Manifest b/dev-python/distlib/Manifest
index 83ea3006bbe5..59a80e4a647d 100644
--- a/dev-python/distlib/Manifest
+++ b/dev-python/distlib/Manifest
@@ -1,2 +1 @@
-DIST distlib-0.3.2.tar.bz2 1075843 BLAKE2B 
3595dc6af53beb7ff7dc49013e6c3db3453b501b56790a953c2cfea5a73aaca71fc69de68c8121ae92ffafd32a70ffa69d768cfd42844135fd5bd6647611e090
 SHA512 
e033ff2ff6b760f698a20103e01d63fa87bc1839bbf44fce252284c793e10a057dac645d818a4e0a2aa8be97bb85fcf9c8706b2399c505f12a093024d11be578
 DIST distlib-0.3.4.tar.bz2 1169083 BLAKE2B 
f1b5e5ca7d0155d204db177d9844cdff4d593be3d927bd5f9e8ad07065b52383527d3990b66c5868bb8377703d031958c5c88a9daf4f0b238903ddbea3ef6cf0
 SHA512 
24f8d6f5012c881ffa6bbdae7887ee5a7608ac36a83e2a96cb8a337d1ab6c896a4078028d0383165ff44be6b735aa31f7d199845d89899813be74ed00e1680e8

diff --git a/dev-python/distlib/distlib-0.3.2.ebuild 
b/dev-python/distlib/distlib-0.3.2.ebuild
deleted file mode 100644
index fa54b57e602c..
--- a/dev-python/distlib/distlib-0.3.2.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_USE_SETUPTOOLS=no
-PYTHON_COMPAT=( python3_{7..10} 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 ~m68k ~mips ppc ppc64 ~riscv ~s390 
sparc x86 ~x64-macos"
-IUSE="test"
-# This package's tests are extremely fragile and tend to break or hang
-# when it doesn't like metadata of packages installed on the system.
-RESTRICT="test"
-
-# pypiserver is called as external executable
-# openpyxl installs invalid metadata that breaks distlib
-BDEPEND="
-   test? (
-   dev-python/pypiserver
-   !!
-Date: Sat, 29 May 2021 22:08:57 +0200
-Subject: [PATCH] Fix test_is_compatible to fix Python 3.10 support
-
-On Python 3.10, PYVER is py310 which wrongly matches the original
-'py27' <= PYVER < 'py32' condition.  Replace it with explicit match
-against known Python versions in this range.  This is probably
-the simplest and the most future-proof solution to the problem at hand.

- tests/test_wheel.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/test_wheel.py b/tests/test_wheel.py
-index 849e7c1..7c8f5ee 100644
 a/tests/test_wheel.py
-+++ b/tests/test_wheel.py
-@@ -206,7 +206,7 @@ class WheelTestCase(DistlibTestCase):
- 
- def test_is_compatible(self):
- fn = os.path.join(HERE, 'dummy-0.1-py27-none-any.whl')
--if 'py27' <= PYVER < 'py32':
-+if PYVER in ('py27', 'py30', 'py31'):
- self.assertTrue(is_compatible(fn))
- self.assertTrue(Wheel(fn).is_compatible())
- # use actual wheel names from PyPI.
--- 
-2.31.1
-



[gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/, dev-python/distlib/files/

2020-07-25 Thread Michał Górny
commit: f5718394d6d0ce746126782fdcb42759ad0177b4
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Jul 25 07:55:35 2020 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Jul 25 08:31:23 2020 +
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  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
!!
 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)



[gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/, dev-python/distlib/files/

2020-07-08 Thread Michał Górny
commit: 81573375223269fcb469cb2dcce59fbe753f3d5e
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Jul  8 07:50:11 2020 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed Jul  8 08:26:01 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81573375

dev-python/distlib: Bump to 0.3.1, fix tests

Signed-off-by: Michał Górny  gentoo.org>

 dev-python/distlib/Manifest|  1 +
 dev-python/distlib/distlib-0.3.1.ebuild| 51 ++
 .../files/distlib-0.3.1-system-pypiserver.py   | 37 
 3 files changed, 89 insertions(+)

diff --git a/dev-python/distlib/Manifest b/dev-python/distlib/Manifest
index 4bbb3b2204a..2183bfda011 100644
--- a/dev-python/distlib/Manifest
+++ b/dev-python/distlib/Manifest
@@ -1 +1,2 @@
 DIST distlib-0.3.0.tar.bz2 848089 BLAKE2B 
70f88b570229e2ab4c95bd8da0375aba189f66dec8defcf8eedf1be6924d93bd20b54c68e5fba867a6c68a31d4ef926ee2dc18ccb0391278680f30a62d0cd251
 SHA512 
01b0e7d59736414a241efdf883e4ee63eafe9614ce3b4147781a5750d25d6383543146c5277e3e0d3e11ce03693afd0331c6e3416776a6f84de7a4d9dadf3de4
+DIST distlib-0.3.1.tar.bz2 1068500 BLAKE2B 
52135869242f71cc6d6887da6d9e20ffc6b46c84d8146393961062d92d8c0bd68e1309277f64fdec0319ff3c503b1caaba3d5378f5c081dca79573c8d9c2e6f2
 SHA512 
f259299176c45be7024b80759015a2fad120ffdde55b6abea0f7fb0335cee90809b5daedcb88abdfb68fd496284b2e478df622004b3750327bfc86807581116c

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 000..349667d657a
--- /dev/null
+++ b/dev-python/distlib/distlib-0.3.1.ebuild
@@ -0,0 +1,51 @@
+# 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 )"
+
+# openpyxl installs invalid metadata that breaks distlib
+BDEPEND="
+   test? (
+   dev-python/pypiserver[${PYTHON_USEDEP}]
+   !!
+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..623b027 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 = [sys.executable, '-m', 'pypiserver',
+'-P', 'passwords', 'packages']
+ cls.server = subprocess.Popen(cmd, stdout=sink, stderr=sink,
+   cwd=HERE)
+-- 
+2.27.0
+



[gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/, dev-python/distlib/files/

2015-11-02 Thread Justin Lecher
commit: a8b5173a082c63e1f9f54861b055fda71804f02a
Author: Justin Lecher  gentoo  org>
AuthorDate: Mon Nov  2 13:10:52 2015 +
Commit: Justin Lecher  gentoo  org>
CommitDate: Mon Nov  2 13:15:37 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8b5173a

dev-python/distlib: Import unbundle patch from fedora, fix broken tests

Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher  gentoo.org>

 dev-python/distlib/distlib-0.2.1-r1.ebuild | 47 ++
 .../distlib/files/distlib-0.2.1-unbundle.patch | 35 
 2 files changed, 82 insertions(+)

diff --git a/dev-python/distlib/distlib-0.2.1-r1.ebuild 
b/dev-python/distlib/distlib-0.2.1-r1.ebuild
new file mode 100644
index 000..5f84329
--- /dev/null
+++ b/dev-python/distlib/distlib-0.2.1-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3  )
+
+inherit distutils-r1
+
+DESCRIPTION="Distribution utilities"
+HOMEPAGE="https://pypi.python.org/pypi/distlib 
https://bitbucket.org/vinay.sajip/distlib https://github.com/vsajip/distlib;
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+PATCHES=(
+   "${FILESDIR}"/${P}-unbundle.patch
+)
+
+python_prepare_all() {
+   rm -r \
+   distlib/*.exe \
+   distlib/_backport \
+   tests/test_shutil.py* \
+   tests/test_sysconfig.py* || die
+
+   # Broken tests
+   # 1 fails due to it being sensitive to dictionary ordering
+   # inconsistency between code and test
+   sed \
+   -e 's:test_dependency_finder:_&:g' \
+   -e 's:test_abi:_&:g' \
+   -i tests/*py || die
+
+   distutils-r1_python_prepare_all
+}
+
+python_test() {
+   sed \
+   -e '/PIP_AVAILABLE/s:True:False:g' \
+   -i tests/*py || die
+   PYTHONHASHSEED=0 esetup.py test
+}

diff --git a/dev-python/distlib/files/distlib-0.2.1-unbundle.patch 
b/dev-python/distlib/files/distlib-0.2.1-unbundle.patch
new file mode 100644
index 000..5ee9129
--- /dev/null
+++ b/dev-python/distlib/files/distlib-0.2.1-unbundle.patch
@@ -0,0 +1,35 @@
+--- distlib-0.1.9/distlib/compat.py.orig   2014-06-06 09:58:21.317560756 
+0200
 distlib-0.1.9/distlib/compat.py2014-06-06 09:58:29.955611427 +0200
+@@ -17,7 +17,7 @@ if sys.version_info[0] < 3:
+ from types import FileType as file_type
+ import __builtin__ as builtins
+ import ConfigParser as configparser
+-from ._backport import shutil
++import shutil
+ from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
+ from urllib import (urlretrieve, quote as _quote, unquote, url2pathname,
+ pathname2url, ContentTooShortError, splittype)
+@@ -267,7 +267,7 @@ except ImportError: # pragma: no cover
+ try:
+ import sysconfig
+ except ImportError: # pragma: no cover
+-from ._backport import sysconfig
++import sysconfig
+ 
+ try:
+ callable = callable
+--- distlib-0.1.9/setup.py.orig2014-06-06 10:19:13.971997156 +0200
 distlib-0.1.9/setup.py 2014-06-06 10:19:20.012034150 +0200
+@@ -62,12 +62,7 @@ distutils.core.setup(
+ platforms='any',
+ packages=[
+ 'distlib',
+-'distlib._backport',
+ ],
+-package_data={
+-'distlib._backport': ['sysconfig.cfg'],
+-'distlib': ['t32.exe', 't64.exe', 'w32.exe', 'w64.exe'],
+-},
+ cmdclass={
+ 'test': TestCommand,
+ },