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: I4f96e60a45c9ca93e9e3cd1951900371f20bb06d
This commit is contained in:
huang.zhiping 2018-06-08 14:27:27 +08:00
parent f5c08e7736
commit 68857ea13d
1 changed files with 9 additions and 0 deletions

View File

@ -2,6 +2,7 @@
envlist = py27,pep8
[testenv]
basepython = python3
distribute = False
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
@ -11,27 +12,33 @@ sitepackages = False
[tox:jenkins]
[testenv:style]
basepython = python3
deps = flake8
setuptools_git>=0.4
commands = flake8 astara setup.py
[testenv:pep8]
basepython = python3
deps = {[testenv:style]deps}
commands = {[testenv:style]commands}
[testenv:doc]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt
commands =
sphinx-build doc/source doc/build
sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:cover]
basepython = python3
setenv = NOSE_WITH_COVERAGE=1
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:functional]
basepython = python3
commands = nosetests -v ./astara/test/functional/
[flake8]
@ -40,7 +47,9 @@ exclude=.venv,.git,.tox,dist,doc,.idea
show-source = True
[testenv:genconfig]
basepython = python3
commands = {toxinidir}/tools/generate_config_file_samples.sh
[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html