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: I922ca42cb37a72be1bfe0765c17b075d6e08e1fa
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 15:27:00 -04:00
parent 8ac4c0b655
commit ac7a2019e1
1 changed files with 9 additions and 0 deletions

View File

@ -20,11 +20,13 @@ commands =
stestr run {posargs}
[testenv:pep8]
basepython = python3
commands =
flake8
{toxinidir}/tools/check_samples.sh
[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
@ -32,9 +34,11 @@ deps =
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --source neutron_lib --parallel-mode
@ -45,6 +49,7 @@ commands =
coverage xml -o cover/coverage.xml
[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
@ -52,6 +57,7 @@ deps =
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:api-ref]
basepython = python3
whitelist_externals = rm
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
@ -62,6 +68,7 @@ commands =
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
[testenv:linkcheck]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
@ -74,9 +81,11 @@ commands =
sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
[testenv:debug]
basepython = python3
commands = oslo_debug_helper -t neutron_lib/tests/unit {posargs}
[testenv:api-report]
basepython = python3
commands =
{toxinidir}/tools/api_report.sh