From cec52b19984c8165fe51cb810ebce3602a306351 Mon Sep 17 00:00:00 2001 From: zhulingjie Date: Fri, 8 Jun 2018 18:46:18 -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: I7c66c9701e4d6733a0ed9794f750326ce48d25ce --- tox.ini | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tox.ini b/tox.ini index ad81e160c0..dcb717e881 100644 --- a/tox.ini +++ b/tox.ini @@ -39,6 +39,7 @@ setenv = [testenv:docs] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands= bash -c "rm -rf doc/build" @@ -48,6 +49,7 @@ commands= [testenv:deploy-guide] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d deploy-guide/build/doctrees -b html deploy-guide/source deploy-guide/build/html @@ -60,6 +62,7 @@ extensions = .rst [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 @@ -68,12 +71,14 @@ commands = # environment used by the -infra templated docs job [testenv:venv] +basepython = python3 commands = {posargs} [testenv:pep8] +basepython = python3 commands = bash -c "{toxinidir}/tests/common/test-pep8.sh" @@ -88,6 +93,7 @@ ignore=F403 [testenv:bashate] +basepython = python3 commands = bash -c "{toxinidir}/tests/common/test-bashate.sh" @@ -103,6 +109,7 @@ commands = # or for a stable branch: # http://git.openstack.org/cgit/openstack/openstack-ansible-tests/plain/test-ansible-deps.txt?h=stable/newton [testenv:ansible] +basepython = python3 deps = {[testenv]deps} -r{toxinidir}/global-requirement-pins.txt @@ -111,6 +118,7 @@ deps = [testenv:ansible-syntax] +basepython = python3 deps = {[testenv:ansible]deps} commands = @@ -119,6 +127,7 @@ commands = [testenv:ansible-lint] +basepython = python3 deps = {[testenv:ansible]deps} commands = @@ -127,6 +136,7 @@ commands = [testenv:inventory] +basepython = python3 # Use a fixed seed since some inventory tests rely on specific ordering setenv = {[testenv]setenv} @@ -152,6 +162,7 @@ commands = [testenv:linters] +basepython = python3 deps = {[testenv:docs]deps} {[testenv:ansible]deps}