From de8ef68b71bb30ba27927d35e57fc644a51e6f4c Mon Sep 17 00:00:00 2001 From: "li.jiawang" Date: Sat, 21 Jul 2018 15:46:36 +0800 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: I91abb5cb2e945abae630b07b1929ce1834d0d93d --- tox.ini | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tox.ini b/tox.ini index 2db16ce03..5aba76d6e 100644 --- a/tox.ini +++ b/tox.ini @@ -24,6 +24,7 @@ commands = ostestr --serial '{posargs}' [testenv:pep8] +basepython = python3 commands = flake8 doc8 {posargs} @@ -31,12 +32,15 @@ commands = {[testenv:genconfig]commands} [testenv:genconfig] +basepython = python3 commands = {toxinidir}/tools/generate_config_file_samples.sh [testenv:venv] +basepython = python3 commands = {posargs} [testenv:cover] +basepython = python3 setenv = PYTHON=coverage run --source $project --parallel-mode commands = @@ -47,6 +51,7 @@ commands = coverage report [testenv:releasenotes] +basepython = python3 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:docs] @@ -72,6 +77,7 @@ exclude = ./.*,dist,doc,build,tools ignore-path = .venv,.git,.tox,.tmp,*dragonflow/locale*,*lib/python*,dragonflow.egg*,doc/build,releasenotes/*,doc/source/contributor/api [testenv:pylint] +basepython = python3 deps = {[testenv]deps} pylint