Make tox.ini tox 4.0.0 compatible

* removed skipsdist=True to make sure placement available in the virtual

* passenv fixed as space separated list is not allowed any more

* improved the doc generation command line to print all the errors
  instead of stopping at the first one

* added functional-py310 for convenience

* removed basepython = python3 as we assume all developer switched to
  python3 in their env already

* removed ignore_basepython_conflict = True as without the basepython
  definition generative targets now work without conflict

* updated the install_command to mimic better what tox uses by default

Change-Id: I1de24b7a98f149fce33d4e5eca82460eea72140b
This commit is contained in:
Balazs Gibizer 2022-12-22 15:46:04 +01:00
parent bacd2c0393
commit 1c8afcd3f1
1 changed files with 11 additions and 11 deletions

View File

@ -1,20 +1,14 @@
minversion = 3.18.0
envlist = py39,functional-py39,pep8
skipsdist = True
# Automatic envs (pyXX) will use the python version appropriate to that
# env and ignore basepython inherited from [testenv]. That's what we
# want, and we don't need to be warned about it.
ignore_basepython_conflict = True
basepython = python3
usedevelop = True
allowlist_externals =
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:} {opts} {packages}
install_command = python -I -m pip install -c{env:UPPER_CONSTRAINTS_FILE:} {opts} {packages}
setenv =
@ -30,7 +24,8 @@ deps = -r{toxinidir}/test-requirements.txt
commands =
stestr run {posargs}
passenv =
# there is also secret magic in subunit-trace which lets you run in a fail only
# mode. To do this define the TRACE_FAILONLY environmental variable.
@ -49,6 +44,11 @@ envdir = {toxworkdir}/py39
commands =
envdir = {toxworkdir}/py310
commands =
description =
Run style checks.
@ -109,7 +109,7 @@ description =
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
sphinx-build -W --keep-going -b html -j auto doc/source doc/build/html
# Test the redirects
whereto doc/build/html/.htaccess doc/test/redirect-tests.txt
@ -163,9 +163,9 @@ max-complexity=19
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files, and develop mode disabled
# explicitly to avoid unnecessarily installing the checked-out repo too (this
# further relies on "tox.skipsdist = True" above).
# explicitly to avoid unnecessarily installing the checked-out repo too
usedevelop = False
skipsdist = True
deps = bindep
commands =
bindep test