From 88ff5e1b1fd9f9e350c82a60394cd9a625dc25d1 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 6 Jun 2018 16:06:05 -0400 Subject: [PATCH] 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: Ia481330b9a889b113b585fca0d4ddb86df9f74d3 Signed-off-by: Doug Hellmann --- tox.ini | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tox.ini b/tox.ini index ff81da8c5..fe25b9350 100644 --- a/tox.ini +++ b/tox.ini @@ -18,35 +18,42 @@ commands = passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:pep8] +basepython = python3 commands = doc8 doc/source/ CONTRIBUTING.rst HACKING.rst README.rst flake8 bandit -r watcher -x tests -n5 -ll -s B320 [testenv:venv] +basepython = python3 setenv = PYTHONHASHSEED=0 commands = {posargs} [testenv:cover] +basepython = python3 commands = python setup.py testr --coverage --testr-args='{posargs}' coverage report [testenv:docs] +basepython = python3 setenv = PYTHONHASHSEED=0 commands = doc8 doc/source/ CONTRIBUTING.rst HACKING.rst README.rst python setup.py build_sphinx [testenv:debug] +basepython = python3 commands = oslo_debug_helper -t watcher/tests {posargs} [testenv:genconfig] +basepython = python3 sitepackages = False commands = oslo-config-generator --config-file etc/watcher/oslo-config-generator/watcher.conf [testenv:genpolicy] +basepython = python3 commands = oslopolicy-sample-generator --config-file etc/watcher/oslo-policy-generator/watcher-policy-generator.conf @@ -59,6 +66,7 @@ enable-extensions = H106,H203,H904 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,*sqlalchemy/alembic/versions/*,demo/,releasenotes [testenv:wheel] +basepython = python3 commands = python setup.py bdist_wheel [hacking] @@ -71,9 +79,11 @@ extension=.rst ignore-path=doc/source/image_src,doc/source/man,doc/source/api [testenv:releasenotes] +basepython = python3 commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:bandit] +basepython = python3 deps = -r{toxinidir}/test-requirements.txt commands = bandit -r watcher -x tests -n5 -ll -s B320