commit:     1f5d302eadccdfbc16c392b6191242df292879e8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 06:03:57 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat May 21 06:47:11 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f5d302e

dev-python/pbr: Enable py3.11

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

 dev-python/pbr/pbr-5.9.0.ebuild | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/dev-python/pbr/pbr-5.9.0.ebuild b/dev-python/pbr/pbr-5.9.0.ebuild
index c78b5363efe1..35ac02ee250f 100644
--- a/dev-python/pbr/pbr-5.9.0.ebuild
+++ b/dev-python/pbr/pbr-5.9.0.ebuild
@@ -4,12 +4,18 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_TESTED=( python3_{8..10} )
+PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_11 pypy3 )
 PYTHON_REQ_USE="threads(+)"
+
 inherit distutils-r1
 
 DESCRIPTION="Inject some useful and sensible default behaviors into setuptools"
-HOMEPAGE="https://github.com/openstack/pbr/";
+HOMEPAGE="
+       https://opendev.org/openstack/pbr/
+       https://github.com/openstack/pbr/
+       https://pypi.org/project/pbr/
+"
 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
 
 LICENSE="Apache-2.0"
@@ -35,22 +41,18 @@ BDEPEND="
                        >=dev-python/testtools-2.2.0[${PYTHON_USEDEP}]
                        >=dev-python/virtualenv-20.0.3[${PYTHON_USEDEP}]
                        dev-vcs/git
-               ' 'python*')
+               ' "${PYTHON_TESTED[@]}")
        )"
 
 distutils_enable_tests unittest
 
-# This normally actually belongs here.
 python_prepare_all() {
        # TODO: investigate
        sed -e s':test_console_script_develop:_&:' \
                -e s':test_console_script_install:_&:' \
                -i pbr/tests/test_core.py || die
-       # broken on pypy3
-       # https://bugs.launchpad.net/pbr/+bug/1881479
-       sed -e 's:test_generates_c_extensions:_&:' \
-               -i pbr/tests/test_packaging.py || die
-       rm pbr/tests/test_wsgi.py || die "couldn't remove wsgi network tests"
+       # network
+       rm pbr/tests/test_wsgi.py || die
        # installs random packages via pip from the Internet
        sed -e 's:test_requirement_parsing:_&:' \
                -e 's:test_pep_517_support:_&:' \
@@ -60,7 +62,7 @@ python_prepare_all() {
 }
 
 python_test() {
-       if [[ ${EPYTHON} != python* ]]; then
+       if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
                einfo "Testing on ${EPYTHON} is not supported at the moment"
                return
        fi

Reply via email to