fix tox python3 overrides

We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I2cb16250241781abe7c5a7d7de37612f07ff2b0b
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 17:58:18 -04:00
parent 0cb0ffa32d
commit e23c448c32
1 changed files with 7 additions and 0 deletions

View File

@ -23,12 +23,15 @@ commands =
# mode. To do this define the TRACE_FAILONLY environmental variable.
[testenv:pep8]
basepython = python3
commands = flake8 {posargs}
[testenv:bandit]
basepython = python3
commands = bandit -r novaclient -n5 -x tests
[testenv:venv]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt
@ -37,6 +40,7 @@ deps =
commands = {posargs}
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
@ -45,6 +49,7 @@ commands =
sphinx-build -b html doc/source doc/build/html
[testenv:releasenotes]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
@ -71,6 +76,7 @@ commands =
python novaclient/tests/functional/hooks/check_resources.py
[testenv:cover]
basepython = python3
commands =
python setup.py testr --coverage --testr-args='{posargs}'
coverage report
@ -92,6 +98,7 @@ exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build,doc/source/conf.py,releasen
import_exceptions = novaclient.i18n
[testenv:bindep]
basepython = python3
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed