Add support for tox 4

Some random fixups to make it tox 4-compliant.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Iea0a929bda37d748497e6fdd730767e25bd9a6dc
This commit is contained in:
Stephen Finucane 2023-01-10 13:56:18 +00:00
parent 624cb97222
commit 59a3dc90a9

50
tox.ini
View File

@ -1,15 +1,12 @@
[tox] [tox]
minversion = 2.0 minversion = 3.0
envlist = py37,pep8 envlist = py3,pep8
skipsdist = True
[testenv] [testenv]
usedevelop = True usedevelop = true
passenv = UPPER_CONSTRAINTS_FILE passenv =
install_command = pip install -U {opts} {packages} TOX_CONSTRAINTS_FILE
basepython = python3
setenv = setenv =
VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8 LANG=en_US.UTF-8
LANGUAGE=en_US:en LANGUAGE=en_US:en
LC_ALL=C LC_ALL=C
@ -17,17 +14,18 @@ setenv =
OS_STDERR_CAPTURE=1 OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60 OS_TEST_TIMEOUT=60
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
commands = stestr run {posargs} commands =
stestr slowest stestr run {posargs}
stestr slowest
[testenv:pep8] [testenv:pep8]
usedevelop = False usedevelop = false
skip_install = True skip_install = true
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
doc8 doc8
hacking hacking
pygments pygments
@ -50,29 +48,23 @@ commands =
coverage xml -o cover/coverage.xml coverage xml -o cover/coverage.xml
[testenv:docs] [testenv:docs]
skip_install = True skip_install = true
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt -r{toxinidir}/doc/requirements.txt
commands = commands =
sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
[testenv:releasenotes] [testenv:releasenotes]
skip_install = True skip_install = true
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8] [flake8]
show-source = True show-source = True
builtins = _ builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,releasenotes/source/conf.py exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,releasenotes/source/conf.py
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt