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 of that
breaks the more specific versions used in default environments like
py35 and py36.

Depends-On: https://review.openstack.org/#/c/573012/

Change-Id: I71a6231832fc191633b15904246902a21f8a8130
This commit is contained in:
Tuan Do Anh 2018-07-03 15:46:04 +07:00
parent 593bfa0c39
commit 01328ea3c9
1 changed files with 8 additions and 0 deletions

View File

@ -21,38 +21,46 @@ commands =
whitelist_externals = rm whitelist_externals = rm
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:pep8] [testenv:pep8]
basepython = python3
deps = deps =
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
commands = flake8 commands = flake8
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
basepython = python3
commands = commands =
python setup.py testr --coverage --testr-args='{posargs}' python setup.py testr --coverage --testr-args='{posargs}'
coverage report --fail-under=71 --skip-covered coverage report --fail-under=71 --skip-covered
[testenv:genconfig] [testenv:genconfig]
basepython = python3
deps = deps =
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
commands = oslo-config-generator --config-file=etc/api-cfg-gen.conf commands = oslo-config-generator --config-file=etc/api-cfg-gen.conf
oslo-config-generator --config-file=etc/xjob-cfg-gen.conf oslo-config-generator --config-file=etc/xjob-cfg-gen.conf
[testenv:genpolicy] [testenv:genpolicy]
basepython = python3
deps = deps =
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
commands = oslopolicy-sample-generator --config-file=etc/policy-generator.conf commands = oslopolicy-sample-generator --config-file=etc/policy-generator.conf
[testenv:docs] [testenv:docs]
basepython = python3
deps = deps =
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
commands = python setup.py build_sphinx commands = python setup.py build_sphinx
[testenv:debug] [testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs} commands = oslo_debug_helper {posargs}
[flake8] [flake8]