From 51fd143c5a5355b5695c4fd05ceb7f1b40febc85 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 26 Sep 2018 19:01:53 -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: I77638ef2d7876f87c242682034f4bfde60daa5b3 Signed-off-by: Doug Hellmann --- tox.ini | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tox.ini b/tox.ini index 54a842f..3d74f5f 100644 --- a/tox.ini +++ b/tox.ini @@ -11,6 +11,7 @@ setenv = VIRTUAL_ENV={envdir} whitelist_externals = bash [testenv:bindep] +basepython = python3 # Do not install any requirements. We want this to be fast and work even if # system dependencies are missing, since it's used to tell you what system # dependencies are missing! This also means that bindep must be installed @@ -19,9 +20,11 @@ deps = bindep commands = bindep test [testenv:docs] +basepython = python3 commands = python setup.py build_sphinx [testenv:pep8] +basepython = python3 commands = # Run hacking/flake8 check for all python files bash -c "git ls-files | xargs grep --binary-files=without-match \ @@ -41,6 +44,7 @@ commands = bash ci-scripts/ansible-lint.sh [testenv:linters] +basepython = python3 deps = -r{toxinidir}/test-requirements.txt -r{toxinidir}/ansible-requirements.txt @@ -49,6 +53,7 @@ commands = {[testenv:ansible-lint]commands} [testenv:venv] +basepython = python3 commands = {posargs} [flake8]