From 55d1f4006ccab853ccae34ab861834f9e28b0f10 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 6 Jun 2018 16:05:59 -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: I6dde50de599eb3b6b001cbc044929c64df044575 Signed-off-by: Doug Hellmann --- tox.ini | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tox.ini b/tox.ini index f0fc98dc20..b76ad575cb 100644 --- a/tox.ini +++ b/tox.ini @@ -27,6 +27,7 @@ commands = stestr run '^(?!heat_integrationtests){posargs}' [testenv:pep8] +basepython = python3 commands = flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-engine bin/heat-manage contrib heat_integrationtests doc/source python tools/custom_guidelines.py --exclude heat/engine/resources/aws @@ -46,9 +47,11 @@ commands = bandit -r heat -x tests --skip B101,B104,B107,B110,B310,B311,B404,B410,B504,B506,B603,B607 [testenv:venv] +basepython = python3 commands = {posargs} [testenv:cover] +basepython = python3 setenv = PYTHON=coverage run --source heat --parallel-mode commands = @@ -61,12 +64,14 @@ commands = coverage report [testenv:docs] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = rm -rf doc/build sphinx-build -b html doc/source doc/build/html [testenv:api-ref] +basepython = python3 # This environment is called from CI scripts to test and publish # the API Ref to developer.openstack.org. deps = -r{toxinidir}/doc/requirements.txt @@ -77,15 +82,18 @@ commands = sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html [testenv:genconfig] +basepython = python3 commands = oslo-config-generator --config-file=config-generator.conf oslo-config-generator --config-file=heat_integrationtests/config-generator.conf [testenv:genpolicy] +basepython = python3 commands = oslopolicy-sample-generator --config-file etc/heat/heat-policy-generator.conf [testenv:bandit] +basepython = python3 deps = -r{toxinidir}/test-requirements.txt # The following bandit tests are being skipped: # B101: Test for use of assert @@ -112,9 +120,11 @@ import_exceptions = heat.common.i18n local-check-factory = heat.hacking.checks.factory [testenv:debug] +basepython = python3 commands = oslo_debug_helper {posargs} [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