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: I61dcae5c3f3f1baec315855604a7c887ebf9c5a5
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 14:50:07 -04:00
parent f2ed61fe72
commit e2319c939b
1 changed files with 7 additions and 1 deletions

View File

@ -4,7 +4,6 @@ skipsdist = True
envlist = py35,py27,pep8
[testenv]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
@ -33,6 +32,7 @@ setenv = {[testenv:functional]setenv}
deps = {[testenv:functional]deps}
[testenv:pep8]
basepython = python3
commands =
flake8
# Run security linter
@ -40,15 +40,19 @@ commands =
distribute = false
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
commands = python setup.py testr --coverage --testr-args='{posargs}'
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
[testenv:bandit]
basepython = python3
commands = bandit -r osprofiler -n5
[flake8]
@ -60,9 +64,11 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,setup.py,build,releasen
local-check-factory = osprofiler.hacking.checks.factory
[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt