From c44352f31baa1db70cedc3779d913e299116c24f Mon Sep 17 00:00:00 2001 From: Tuan Do Anh Date: Tue, 3 Jul 2018 15:06:25 +0700 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 of that breaks the more specific versions used in default environments like py35 and py36. Change-Id: Iadbc25016279958768928e9c63ee545c0bca0e23 --- tox.ini | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tox.ini b/tox.ini index e3919533..5030ec96 100644 --- a/tox.ini +++ b/tox.ini @@ -28,6 +28,7 @@ setenv = [testenv:docs] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands= bash -c "rm -rf doc/build" @@ -41,6 +42,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 @@ -48,11 +50,13 @@ 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" @@ -65,16 +69,19 @@ ignore=F403 [testenv:bashate] +basepython = python3 commands = bash -c "{toxinidir}/tests/common/test-bashate.sh" [testenv:ansible-syntax] +basepython = python3 commands = bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh" [testenv:ansible-lint] +basepython = python3 commands = bash -c "{toxinidir}/tests/common/test-ansible-lint.sh" @@ -85,6 +92,7 @@ commands = [testenv:linters] +basepython = python3 commands = bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh" {[testenv:pep8]commands}