diff options
author | Stephen Finucane <sfinucan@redhat.com> | 2023-01-03 18:42:44 +0000 |
---|---|---|
committer | Stephen Finucane <sfinucan@redhat.com> | 2023-01-06 13:22:38 +0000 |
commit | 491ce1ab095b122b442de1ce662ebc2e29d27de3 (patch) | |
tree | aed568fa31217771d715f66fbe5463bac0c9b128 | |
parent | 45d4c9f02fafb425e61a18bbd7a20ef456293a56 (diff) | |
download | pbr-491ce1ab095b122b442de1ce662ebc2e29d27de3.tar.gz |
Update tox.ini to work with tox 4
Resolve the following warnings:
tox.tox_env.errors.Fail: pass_env values cannot contain whitespace,
use comma to have multiple values in a single line, invalid values
found 'PBR_INTEGRATION PIPFLAGS PIPVERSION PBRVERSION REPODIR
WHEELHOUSE PROJECTS'
Also, reduce down the envlist as tox 4 when run in OpenStack CI is
also attempting to validate interpreters utilizing the
--skip-missing-interpreters=false setting [1].
Finally, fix up the integration job so that it passes on Ubuntu 22.04.
This necessitates removing any Python 2-based dependencies used in the
these jobs (since these are no longer available on Ubuntu 22.04) and
removing tests for pip versions that are not compatible with Python 3.10
(the Python version found on Ubuntu 22.04).
[1] https://github.com/tox-dev/tox/issues/2811
Change-Id: Ib4dbe4e09e269219c08a87f6fb64ad9628b5864a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
-rw-r--r-- | pbr/tests/test_integration.py | 33 | ||||
-rw-r--r-- | tools/integration.sh | 4 | ||||
-rw-r--r-- | tox.ini | 21 |
3 files changed, 34 insertions, 24 deletions
diff --git a/pbr/tests/test_integration.py b/pbr/tests/test_integration.py index 25473b0..8b5e76a 100644 --- a/pbr/tests/test_integration.py +++ b/pbr/tests/test_integration.py @@ -210,20 +210,24 @@ class TestMarkersPip(base.BaseTestCase): scenarios = [ ('pip-latest', {'modules': ['pip']}), - ('setuptools-Bionic', { - 'modules': ['pip==9.0.1', 'setuptools==39.0.1']}), - ('setuptools-Stretch', { - 'modules': ['pip==9.0.1', 'setuptools==33.1.1']}), - ('setuptools-EL8', {'modules': ['pip==9.0.3', 'setuptools==39.2.0']}), - ('setuptools-Buster', { - 'modules': ['pip==18.1', 'setuptools==40.8.0']}), - ('setuptools-Focal', { - 'modules': ['pip==20.0.2', 'setuptools==45.2.0']}), + ( + 'setuptools-Bullseye', + {'modules': ['pip==20.3.4', 'setuptools==52.0.0']}, + ), + ( + 'setuptools-Focal', + {'modules': ['pip==20.0.2', 'setuptools==45.2.0']}, + ), + ( + 'setuptools-Jammy', + {'modules': ['pip==22.0.2', 'setuptools==59.6.0']}, + ), ] @testtools.skipUnless( os.environ.get('PBR_INTEGRATION', None) == '1', - 'integration tests not enabled') + 'integration tests not enabled', + ) def test_pip_versions(self): pkgs = { 'test_markers': @@ -265,16 +269,15 @@ class TestLTSSupport(base.BaseTestCase): # These versions come from the versions installed from the 'virtualenv' # command from the 'python-virtualenv' package. scenarios = [ - ('Bionic', {'modules': ['pip==9.0.1', 'setuptools==39.0.1']}), - ('Stretch', {'modules': ['pip==9.0.1', 'setuptools==33.1.1']}), - ('EL8', {'modules': ['pip==9.0.3', 'setuptools==39.2.0']}), - ('Buster', {'modules': ['pip==18.1', 'setuptools==40.8.0']}), + ('Bullseye', {'modules': ['pip==20.3.4', 'setuptools==52.0.0']}), ('Focal', {'modules': ['pip==20.0.2', 'setuptools==45.2.0']}), + ('Jammy', {'modules': ['pip==22.0.2', 'setuptools==59.6.0']}), ] @testtools.skipUnless( os.environ.get('PBR_INTEGRATION', None) == '1', - 'integration tests not enabled') + 'integration tests not enabled', + ) def test_lts_venv_default_versions(self): venv = self.useFixture( test_packaging.Venv('setuptools', modules=self.modules)) diff --git a/tools/integration.sh b/tools/integration.sh index 13480f9..0e99b43 100644 --- a/tools/integration.sh +++ b/tools/integration.sh @@ -38,9 +38,9 @@ sudo apt-get install -y --force-yes libvirt-dev libxml2-dev libxslt-dev libmysql # by apt-cache showsrc <PKG> # Numpy -sudo apt-get install -y --force-yes cython debhelper gfortran libblas-dev liblapack-dev python-all-dbg python-all-dev python-nose python-tz python3-all-dbg python3-all-dev python3-nose python3-tz +sudo apt-get install -y --force-yes cython3 debhelper gfortran libblas-dev liblapack-dev python3-all-dbg python3-all-dev python3-nose python3-tz #pyyaml -sudo apt-get install -y --force-yes debhelper python-all-dev python-all-dbg python3-all-dev python3-all-dbg libyaml-dev cython cython-dbg quilt +sudo apt-get install -y --force-yes debhelper python3-all-dev python3-all-dbg libyaml-dev cython3 cython3-dbg quilt # And use ccache explitly export PATH=/usr/lib/ccache:$PATH @@ -1,12 +1,17 @@ [tox] minversion = 3.18.0 -envlist = pep8,py27,py37,docs -ignore_basepython_conflict = True +envlist = pep8,py3,docs [testenv] -usedevelop = True -basepython = python3 -passenv = PBR_INTEGRATION PIPFLAGS PIPVERSION PBRVERSION REPODIR WHEELHOUSE PROJECTS +usedevelop = true +passenv = + PBR_INTEGRATION + PIPFLAGS + PIPVERSION + PBRVERSION + REPODIR + WHEELHOUSE + PROJECTS # TODO(fungi): drop distutils override once logging improves in Setuptools # https://github.com/pypa/setuptools/issues/3038 setenv = @@ -24,7 +29,8 @@ commands = stestr run --suppress-attachments {posargs} commands = pre-commit run -a [testenv:docs] -allowlist_externals = rm +allowlist_externals = + rm deps = -r{toxinidir}/doc/requirements.txt commands = @@ -33,7 +39,8 @@ commands = sphinx-build -W -b html doc/source doc/build/html {posargs} [testenv:releasenotes] -allowlist_externals = rm +allowlist_externals = + rm deps = {[testenv:docs]deps} commands = rm -rf releasenotes/build |