summaryrefslogtreecommitdiff
path: root/dev-python/pbr
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-31 15:23:38 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-31 15:23:38 +0100
commita407e25d814596ca802d83102671d95e00079767 (patch)
treeb0d4824cf74ddca3ee380c618ffae855cd0d1bcd /dev-python/pbr
parent441510fa20665b7920b149994e72b3a1cd62a813 (diff)
gentoo auto-resync : 31:05:2023 - 15:23:38
Diffstat (limited to 'dev-python/pbr')
-rw-r--r--dev-python/pbr/Manifest3
-rw-r--r--dev-python/pbr/files/pbr-5.11.1-importlib-suffixes.patch41
-rw-r--r--dev-python/pbr/pbr-5.11.1.ebuild19
3 files changed, 57 insertions, 6 deletions
diff --git a/dev-python/pbr/Manifest b/dev-python/pbr/Manifest
index c195d633129e..56522d46b470 100644
--- a/dev-python/pbr/Manifest
+++ b/dev-python/pbr/Manifest
@@ -1,3 +1,4 @@
+AUX pbr-5.11.1-importlib-suffixes.patch 1383 BLAKE2B a8931bfe53a6609479de4eaa27a9ed28bd59319f79cf80dbe8f2578783cc6b57d641ca2c014793546efd52615ba4343a2a09527973107568c983c431329566d5 SHA512 537cdcb21e4f104731327f92d2af0b478fa9cdee792eff206f51ef59e473252c6f1ed6eeba7105b57ea6759d43ce8b4de51f61689a5b1585920ed46a1a675e33
DIST pbr-5.11.1.tar.gz 127597 BLAKE2B 4ed433f271b4cbed3e7baca66cbeef057d575b7b061507c45a65ba93704edbed7b6f8668e9b9766f03079aaf06dbd6c394960c1c528b1beb992db65d0c3b89e4 SHA512 466dc5ce2622c43451186698f00d405141878449ffe9f7771b0057e8356bf12b426a9bfefff7e5843f1b3f963af3ffc9c4a42fa91a9407b79617abea046ff438
-EBUILD pbr-5.11.1.ebuild 2127 BLAKE2B a79028c437edf8765639d7a360f4a0ea03d901a01e3fbf81b6cbc9e37be7e336dc4344561ed239939a2e3b2b53d4ab60fd5f606d283e33597ec3d5bd54cce5e0 SHA512 343480150fae34d365e7dc05aa8c7e20d6e4807e3585d5ad01fbcfd7a9f43aecfe8059203a5ea1459a5e430216a737db30301021ae57ca32ad9ba24a9612bd5b
+EBUILD pbr-5.11.1.ebuild 2330 BLAKE2B b12cadb937a3fbaeb31f38d22428a795e937e4e50ffbc8d5fa54f98cc4ca30e0be7e70808ea1e7804f925493e98fd6159219605dca8b4bf57a3ae808b06f5cee SHA512 c84c034098f26e1ddf161383f64d9c1659583b708b25cf8df5f4f5e54feeb16facf64152d3858fd866773595b1dda758c07b9a2ef20aba8c1c825be5e81ccfec
MISC metadata.xml 815 BLAKE2B 439ee90d79572a8653f1ae3b8b5bf0883adb34ceac5257458dba7a2505e25ebba1c5080095139f6521d8fbd57c11ea38cf4049710b584069aea0ebaa7760077a SHA512 3d0618ef6656706acd829be80b2e6a0b0763b5f4128dcd360f28818d42cbc8825ecd04f7f47af5929a3a35fd60a3b9f9816cc37ee30af164c2e5b51764c25afe
diff --git a/dev-python/pbr/files/pbr-5.11.1-importlib-suffixes.patch b/dev-python/pbr/files/pbr-5.11.1-importlib-suffixes.patch
new file mode 100644
index 000000000000..27609131fc59
--- /dev/null
+++ b/dev-python/pbr/files/pbr-5.11.1-importlib-suffixes.patch
@@ -0,0 +1,41 @@
+Subject: [PATCH] Replace imp with importlib.machinery
+
+The imp was removed in Python 3.12 [1]. This commit replaces
+get_suffixes() method call with _SUFFIXES array from imprtlib.machinery.
+
+[1] https://github.com/python/cpython/issues/98040
+
+---
+
+This is original patch submitted to Github mirror, it was later resubmitted to
+upstream Gerrit, where they are taking care of Python2.7. We can stick with
+this version of patch for now because we don't care about py2.7 anymore.
+
+Original-PR: https://github.com/openstack/pbr/pull/22
+Upstream-PR: https://review.opendev.org/c/openstack/pbr/+/884789
+
+diff --git a/pbr/tests/test_packaging.py b/pbr/tests/test_packaging.py
+index c719d1e..068bab7 100644
+--- a/pbr/tests/test_packaging.py
++++ b/pbr/tests/test_packaging.py
+@@ -40,7 +40,7 @@
+
+ import email
+ import email.errors
+-import imp
++import importlib
+ import os
+ import re
+ import sysconfig
+@@ -1217,7 +1217,7 @@ def get_soabi():
+ # NOTE(sigmavirus24): PyPy only added support for the SOABI config var
+ # to sysconfig in 2015. That was well after 2.2.1 was published in the
+ # Ubuntu 14.04 archive.
+- for suffix, _, _ in imp.get_suffixes():
++ for suffix, _, _ in importlib.machinery._SUFFIXES:
+ if suffix.startswith('.pypy') and suffix.endswith('.so'):
+ soabi = suffix.split('.')[1]
+ break
+--
+2.39.2
+
diff --git a/dev-python/pbr/pbr-5.11.1.ebuild b/dev-python/pbr/pbr-5.11.1.ebuild
index 016fd4a7679a..5448662cdd64 100644
--- a/dev-python/pbr/pbr-5.11.1.ebuild
+++ b/dev-python/pbr/pbr-5.11.1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_TESTED=( python3_{9..11} )
+PYTHON_TESTED=( python3_{10..12} )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" pypy3 )
PYTHON_REQ_USE="threads(+)"
@@ -24,9 +24,14 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv
RDEPEND="
>=dev-python/setuptools-60.5.0[${PYTHON_USEDEP}]
"
-# git is needed for tests, see https://bugs.launchpad.net/pbr/+bug/1326682 and https://bugs.gentoo.org/show_bug.cgi?id=561038
-# docutils is needed for sphinx exceptions... https://bugs.gentoo.org/show_bug.cgi?id=603848
-# stestr is run as external tool
+
+# git is needed for tests, see https://bugs.launchpad.net/pbr/+bug/1326682 and
+# https://bugs.gentoo.org/show_bug.cgi?id=561038 docutils is needed for sphinx
+# exceptions... https://bugs.gentoo.org/show_bug.cgi?id=603848 stestr is run as
+# external tool.
+#
+# <dev-python/sphinx-7 is required because of removed build_sphinx hook in
+# setup.py, see https://bugs.launchpad.net/pbr/+bug/2018453
BDEPEND="
test? (
$(python_gen_cond_dep '
@@ -34,7 +39,7 @@ BDEPEND="
>=dev-python/fixtures-3.0.0[${PYTHON_USEDEP}]
>=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
>=dev-python/six-1.12.0[${PYTHON_USEDEP}]
- dev-python/sphinx[${PYTHON_USEDEP}]
+ <dev-python/sphinx-7[${PYTHON_USEDEP}]
>=dev-python/testresources-2.0.0[${PYTHON_USEDEP}]
>=dev-python/testscenarios-0.4[${PYTHON_USEDEP}]
>=dev-python/testtools-2.2.0[${PYTHON_USEDEP}]
@@ -44,6 +49,10 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}/${P}-importlib-suffixes.patch"
+)
+
distutils_enable_tests unittest
python_prepare_all() {