Update tox config

Update tox min version to something more contemporary.
Default basepython to python3.
Update dependencies of docs and pdf-docs to include upper-constraints.
Move to stestrs and remote os-test from requirements.

Change-Id: I30313dda1a3f56eff2f54632c46cfbdd03aa3cb7
This commit is contained in:
Riccardo Pittau 2021-05-12 16:24:50 +02:00
parent 347bc70ff5
commit 43398c0c47
2 changed files with 21 additions and 14 deletions

View File

@ -4,5 +4,5 @@
doc8 # Apache-2.0
stestr!=2.3.1 # Apache-2.0
os-testr>=1.0.0 # Apache-2.0
testtools>=0.9.34

33
tox.ini
View File

@ -1,30 +1,37 @@
[tox]
minversion = 2.0
minversion = 3.9.0
envlist = linters,docs
skipsdist = True
skipsdist = true
ignore_basepython_conflict = true
[testenv]
usedevelop = True
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
ostestr {posargs}
stestr run {posargs}
doc8 priorities/ specs/ doc/source README.rst
[testenv:venv]
basepython = python3
commands = {posargs}
commands = {posargs:}
[testenv:docs]
basepython = python3
commands = sphinx-build -W -b html doc/source doc/build/html
sitepackages = False
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
commands =
sphinx-build -b html doc/source doc/build/html
[testenv:pdf-docs]
basepython = python3
whitelist_externals = make
commands = sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
sitepackages = False
deps = {[testenv:docs]deps}
commands =
sphinx-build -b latex doc/source doc/build/pdf
make -C doc/build/pdf