diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2023-05-24 19:50:02 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2023-05-24 19:50:02 +0000 |
| commit | 08d63eb0c6998fe0b782d07e86811c05730dbd9b (patch) | |
| tree | a5e6a57061168f9b26a2eb7e9a35b53d7ad7e958 /dev-python/distlib | |
| parent | b8de162d8ddccdbffc26f279e208af94479024e2 (diff) | |
| download | baldeagleos-repo-08d63eb0c6998fe0b782d07e86811c05730dbd9b.tar.gz baldeagleos-repo-08d63eb0c6998fe0b782d07e86811c05730dbd9b.tar.xz baldeagleos-repo-08d63eb0c6998fe0b782d07e86811c05730dbd9b.zip | |
Adding metadata
Diffstat (limited to 'dev-python/distlib')
| -rw-r--r-- | dev-python/distlib/distlib-0.3.6.ebuild | 24 | ||||
| -rw-r--r-- | dev-python/distlib/files/distlib-0.3.6-py312.patch | 50 |
2 files changed, 58 insertions, 16 deletions
diff --git a/dev-python/distlib/distlib-0.3.6.ebuild b/dev-python/distlib/distlib-0.3.6.ebuild index 367129427067..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_{7,8,9,10,11} pypy3 ) +PYTHON_COMPAT=( python3_{10..12} pypy3 ) inherit distutils-r1 @@ -24,30 +24,22 @@ 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 tests/pypi-server-standalone.py || die - - # use system pypiserver instead of broken bundled one - eapply "${FILESDIR}"/distlib-0.3.2-system-pypiserver.py || die + local PATCHES=( + "${FILESDIR}/${P}-py312.patch" - # doesn't work with our patched pip - sed -i -e '/PIP_AVAIL/s:True:False:' tests/test_wheel.py || die + # use system pypiserver instead of bundled one + "${FILESDIR}"/distlib-0.3.2-system-pypiserver.py + ) - # broken with pypy3 - sed -i -e 's:test_custom_shebang:_&:' tests/test_scripts.py || die - # broken with py3.11, doesn't look important - sed -i -e 's:test_sequencer_basic:_&:' tests/test_util.py || die - # https://bugs.gentoo.org/843839 - sed -i -e 's:test_interpreter_args:_&:' tests/test_scripts.py || die + # make sure they're not used + rm tests/pypi-server-standalone.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 000000000000..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 <lbalhar@redhat.com> +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 <vinay_sajip@yahoo.co.uk> +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: |
