From 99ced61d3e4cc3085f92be7ca6057d6ef9701f59 Mon Sep 17 00:00:00 2001 From: "huang.zhiping" Date: Fri, 8 Jun 2018 13:51:02 +0800 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: I3f2720a6e8e6c685d2e5ca288008be20785a8309 --- tox.ini | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 5254fe90..4fbea41e 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,6 @@ deps= passenv=HTTP_PROXY HTTPS_PROXY http_proxy https_proxy NO_PROXY no_proxy setenv= VIRTUAL_ENV={envdir} -basepython = python3.5 usedevelop = True install_command = pip install {opts} {packages} whitelist_externals = @@ -27,24 +26,29 @@ commands = stestr slowest [testenv:docs] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = rm -rf doc/build sphinx-build -W -b html doc/source doc/build/html [testenv:genconfig] +basepython = python3 commands = oslo-config-generator --config-file=etc/armada/config-generator.conf [testenv:genpolicy] +basepython = python3 commands = oslopolicy-sample-generator --config-file=etc/armada/policy-generator.conf [testenv:releasenotes] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:pep8] +basepython = python3 deps = .[bandit] {[testenv]deps} @@ -54,10 +58,12 @@ commands = bandit -r armada -x armada/tests -n 5 [testenv:bandit] +basepython = python3 commands = bandit -r armada -x armada/tests -n 5 [testenv:cover] +basepython = python3 setenv = {[testenv]setenv} PYTHON=coverage run --source armada --parallel-mode commands =