dev-python/pbr: Remove old

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny 2025-10-31 08:28:03 +01:00
parent f37db1f6fb
commit f48312cf04
No known key found for this signature in database
GPG Key ID: 639ADAE2329E240E
4 changed files with 0 additions and 232 deletions

View File

@ -1,3 +1 @@
DIST pbr-6.1.1.tar.gz 125702 BLAKE2B ee675c029f1ccf66ffb3b92fec67802f1a3d49735e08ec72658e7b3b528014109ec2a4ee0672b7c320d70a3b56b9a0a7929a7ae85915d941ce0e170e0cdc92a7 SHA512 db898469dad4d0ccfa90ee9a8faee83db0897e7451c30561d7e1f92163c82c81586853b8aaabcf80569d1cbdf5177da927ed79b0c393f6c5b2a910de0354a471
DIST pbr-7.0.0.tar.gz 129146 BLAKE2B 3a290a90bc6ac9b2162cd5b28cb43c4c1f28efe1141e86b731bad5c727b8370f04fe37031931edfaec075de6c1fe418a6f657c12132a34414158ce66045939b9 SHA512 31e2a5554e46bb4734b5dd7a08ea6080b99a8b61c06463c496be89fb4a73e89435e476bb7c5090949267e4c11c2882ab36ea1f4a667c313006234b203d3eb479
DIST pbr-7.0.1.tar.gz 130086 BLAKE2B e29b94fcd2a0316aac2c5a918d2f94607f50c77225e5535da0381e61e41f05cea01341e77547316816963cda235fed356cf6ffd87c5faf0f2c47ff99122a4d8b SHA512 79e204e81f1ca5c74fdfab3df007e394f0248761c1464c1ffab270347d3c2e25b1aba331be153bdfa4a6fad152a39574df5fffd39051b0242af3cdf05ef454c8

View File

@ -1,84 +0,0 @@
From 55015f69726f8916b9c50d70c856345929dc8cd7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Wed, 5 Feb 2025 12:36:08 +0100
Subject: [PATCH 1/2] Use sysconfig for sitedir path in test_wsgi
Use `sysconfig.get_path()` to obtain the correct site-packages directory
path in `test_wsgi`, instead of attempting to guess it based on Python
version. This fixes the test on PyPy3.10, and seems to be correct
down to Python 2.7 (though tox does not seem to let me test on Python 2
anymore).
Partial-Bug: 2097427
Change-Id: I5c152a98fd371dfb195643f0f5640cf1ffe0ba31
---
pbr/tests/test_wsgi.py | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/pbr/tests/test_wsgi.py b/pbr/tests/test_wsgi.py
index a42fe78..fd11ab4 100644
--- a/pbr/tests/test_wsgi.py
+++ b/pbr/tests/test_wsgi.py
@@ -16,6 +16,7 @@ import os
import re
import subprocess
import sys
+import sysconfig
try:
# python 2
from urllib2 import urlopen
@@ -31,18 +32,7 @@ class TestWsgiScripts(base.BaseTestCase):
cmd_names = ('pbr_test_wsgi', 'pbr_test_wsgi_with_class')
def _get_path(self):
- if os.path.isdir("%s/lib64" % self.temp_dir):
- path = "%s/lib64" % self.temp_dir
- elif os.path.isdir("%s/lib" % self.temp_dir):
- path = "%s/lib" % self.temp_dir
- elif os.path.isdir("%s/site-packages" % self.temp_dir):
- return ".:%s/site-packages" % self.temp_dir
- else:
- raise Exception("Could not determine path for test")
- return ".:%s/python%s.%s/site-packages" % (
- path,
- sys.version_info[0],
- sys.version_info[1])
+ return sysconfig.get_path("purelib", vars={"base": self.temp_dir})
def test_wsgi_script_install(self):
"""Test that we install a non-pkg-resources wsgi script."""
From 4bcc6bcb46644492ec07094411d58817cfe08d7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Wed, 5 Feb 2025 11:26:55 +0100
Subject: [PATCH 2/2] Modernize tests to use EXT_SUFFIX, fix PyPy
Modernize `test_generates_c_extensions` to use
`sysconfig.get_config_var("EXT_SUFFIX")` whenever available,
to obtain the correct extension file suffix, instead of attempting
to recontruct it from `SOABI`. This fixes test failures on modern
PyPy3.10 versions, and should also be more future-proof for other Python
implementations.
Partial-Bug: 2097427
Change-Id: I5fbeb0ae1193ed68be0beab2857860a525731688
---
pbr/tests/test_packaging.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pbr/tests/test_packaging.py b/pbr/tests/test_packaging.py
index 0ababba..f6e2b31 100644
--- a/pbr/tests/test_packaging.py
+++ b/pbr/tests/test_packaging.py
@@ -413,9 +413,9 @@ class TestPackagingWheels(base.BaseTestCase):
built_package_dir = os.path.join(
self.extracted_wheel_dir, 'pbr_testpackage')
static_object_filename = 'testext.so'
- soabi = get_soabi()
- if soabi:
- static_object_filename = 'testext.{0}.so'.format(soabi)
+ ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
+ if ext_suffix is not None:
+ static_object_filename = 'testext' + ext_suffix
static_object_path = os.path.join(
built_package_dir, static_object_filename)

View File

@ -1,77 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=standalone
PYTHON_TESTED=( pypy3_11 python3_{11..14} )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1 pypi
DESCRIPTION="Inject some useful and sensible default behaviors into setuptools"
HOMEPAGE="
https://opendev.org/openstack/pbr/
https://github.com/openstack/pbr/
https://pypi.org/project/pbr/
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux"
RDEPEND="
>=dev-python/setuptools-64.0.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.
BDEPEND="
${RDEPEND}
test? (
$(python_gen_cond_dep '
>=dev-python/wheel-0.32.0[${PYTHON_USEDEP}]
>=dev-python/fixtures-3.0.0[${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}]
>=dev-python/virtualenv-20.0.3[${PYTHON_USEDEP}]
dev-vcs/git
' "${PYTHON_TESTED[@]}")
)
"
distutils_enable_tests unittest
python_prepare_all() {
local PATCHES=(
# https://review.opendev.org/c/openstack/pbr/+/940773
# https://review.opendev.org/c/openstack/pbr/+/940778
"${FILESDIR}/${P}-test.patch"
)
# TODO: investigate
sed -e 's:test_console_script_develop:_&:' \
-e 's:test_console_script_install:_&:' \
-e 's:test_setup_py_keywords:_&:' \
-i pbr/tests/test_core.py || die
# installs random packages via pip from the Internet
sed -e 's:test_requirement_parsing:_&:' \
-e 's:test_pep_517_support:_&:' \
-i pbr/tests/test_packaging.py || die
distutils-r1_python_prepare_all
}
python_test() {
if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
einfo "Testing on ${EPYTHON} is not supported at the moment"
return
fi
cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
eunittest -b
}

View File

@ -1,69 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=standalone
PYTHON_TESTED=( pypy3_11 python3_{11..14} )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1 pypi
DESCRIPTION="Inject some useful and sensible default behaviors into setuptools"
HOMEPAGE="
https://opendev.org/openstack/pbr/
https://github.com/openstack/pbr/
https://pypi.org/project/pbr/
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux"
RDEPEND="
>=dev-python/setuptools-64.0.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.
BDEPEND="
${RDEPEND}
test? (
$(python_gen_cond_dep '
>=dev-python/wheel-0.32.0[${PYTHON_USEDEP}]
>=dev-python/fixtures-3.0.0[${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}]
>=dev-python/virtualenv-20.0.3[${PYTHON_USEDEP}]
dev-vcs/git
' "${PYTHON_TESTED[@]}")
)
"
distutils_enable_tests unittest
python_prepare_all() {
# TODO: investigate
sed -e 's:test_with_argument:_&:' \
-e 's:test_wsgi_script_run:_&:' \
-i pbr/tests/functional/test_wsgi_scripts.py || die
# installs random packages via pip from the Internet
rm pbr/tests/functional/test_pep517.py || die
rm pbr/tests/functional/test_requirements.py || die
distutils-r1_python_prepare_all
}
python_test() {
if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
einfo "Testing on ${EPYTHON} is not supported at the moment"
return
fi
cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
eunittest -b
}