From 07cf90a1cb1529221897960b9cf1213c6a89399f Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 26 Sep 2018 19:04:45 -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: I347442f4859b8be127530a0e66efad48383552b9 Signed-off-by: Doug Hellmann --- tox.ini | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tox.ini b/tox.ini index d5f2115b7..7d0500b4a 100644 --- a/tox.ini +++ b/tox.ini @@ -11,6 +11,7 @@ deps = -r{toxinidir}/test-requirements.txt 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,6 +20,7 @@ deps = bindep commands = bindep test [testenv:docs] +basepython = python3 commands = python setup.py build_sphinx [testenv:bashate] @@ -26,6 +28,7 @@ commands = python -m pre_commit run bashate --all-files [testenv:pep8] +basepython = python3 envdir = {toxworkdir}/linters commands = python -m pre_commit run flake8 --all-files @@ -36,10 +39,12 @@ commands = bash ci-scripts/ansible-lint.sh [testenv:releasenotes] +basepython = python3 whitelist_externals = bash commands = bash -c ci-scripts/releasenotes_tox.sh [testenv:linters] +basepython = python3 commands = # check only modified files: python -m pre_commit run --source HEAD^ --origin HEAD @@ -49,6 +54,7 @@ commands = {[testenv:validate-jinja]commands} [testenv:venv] +basepython = python3 commands = {posargs} [flake8]