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: I43b21411d01290ddea7ca5fe11d70e970bf65bb3
This commit is contained in:
huang.zhiping 2018-06-08 14:15:25 +08:00 committed by Alessandro Nesta
parent 5b1b564d57
commit 18197c5fed
1 changed files with 10 additions and 1 deletions

11
tox.ini
View File

@ -4,6 +4,7 @@ minversion = 1.6
skipsdist = True
[testenv]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
usedevelop = True
whitelist_externals = rm
@ -15,6 +16,7 @@ commands =
rm -f .testrepository/times.dbm
[testenv:functional]
basepython = python3
setenv = OS_TEST_PATH=./apmec/tests/functional
deps =
{[testenv]deps}
@ -36,6 +38,7 @@ deps =
sitepackages = True
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:debug-py27]
@ -56,6 +59,7 @@ commands =
whitelist_externals = bash
[testenv:i18n]
basepython = python3
commands = python ./tools/check_i18n.py ./apmec ./tools/i18n_cfg.py
[testenv:docs]
@ -65,6 +69,7 @@ commands =
python setup.py build_sphinx
[testenv:api-ref]
basepython = python3
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
commands =
@ -73,11 +78,12 @@ commands =
whitelist_externals = rm
[testenv:releasenotes]
basepython = python3
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:cover]
basepython = python3
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
commands =
@ -86,6 +92,7 @@ commands =
coverage report
[testenv:venv]
basepython = python3
commands = {posargs}
[flake8]
@ -101,10 +108,12 @@ import_exceptions = apmec._i18n
local-check-factory = apmec.hacking.checks.factory
[testenv:config-gen]
basepython = python3
commands =
oslo-config-generator --config-file=etc/config-generator.conf
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt