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: I65ec3ce0c72467486255868bcff79c70b9bf20f8
This commit is contained in:
huang.zhiping 2018-06-09 18:49:52 +08:00
parent a670ab72c3
commit 9a4c752312
1 changed files with 8 additions and 0 deletions

View File

@ -23,15 +23,19 @@ whitelist_externals = npm
commands = python manage.py test octavia_dashboard --settings=octavia_dashboard.tests.settings commands = python manage.py test octavia_dashboard --settings=octavia_dashboard.tests.settings
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = flake8 commands = flake8
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
basepython = python3
commands = python setup.py test --coverage --testr-args='{posargs}' commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:docs] [testenv:docs]
basepython = python3
whitelist_externals = rm whitelist_externals = rm
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
@ -43,6 +47,7 @@ commands =
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3
whitelist_externals = rm whitelist_externals = rm
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
@ -53,15 +58,18 @@ commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:debug] [testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs} commands = oslo_debug_helper {posargs}
[testenv:eslint] [testenv:eslint]
basepython = python3
# npm must be installed on the system, for example # npm must be installed on the system, for example
# sudo apt-get install npm # sudo apt-get install npm
commands = npm install commands = npm install
npm run lint npm run lint
[testenv:karma] [testenv:karma]
basepython = python3
# npm must be installed on the system, for example # npm must be installed on the system, for example
# sudo apt-get install npm # sudo apt-get install npm
commands = npm install commands = npm install