summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2018-06-06 14:50:07 -0400
committerDoug Hellmann <doug@doughellmann.com>2018-06-06 14:53:49 -0400
commite2319c939b7e64c07756c10d15b93a384468770a (patch)
tree9cb234ad2842a3d26a28844c1b0503fcaa9d29ff
parentf2ed61fe7212b0bc56c07aa8ddac31510ad43754 (diff)
downloadosprofiler-e2319c939b7e64c07756c10d15b93a384468770a.tar.gz
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>
-rw-r--r--tox.ini8
1 files changed, 7 insertions, 1 deletions
diff --git a/tox.ini b/tox.ini
index fd5d9db..902697a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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