From 172eb0b3daa623c4b415192d595b5e0e6f0a2bae Mon Sep 17 00:00:00 2001 From: "huang.zhiping" Date: Wed, 15 Aug 2018 06:35:26 +0000 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: Iff786d273a1511b32fbdae4b5ad647c859df349f --- tox.ini | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tox.ini b/tox.ini index c5f06c77..8fb3e4bf 100644 --- a/tox.ini +++ b/tox.ini @@ -29,6 +29,7 @@ commands = stestr run {posargs} [testenv:cover] +basepython = python3 setenv = PYTHON=coverage run --source monasca_persister --parallel-mode commands = @@ -38,9 +39,11 @@ commands = coverage xml -o cover/coverage.xml [testenv:debug] +basepython = python3 commands = oslo_debug_helper -t monasca_persister/tests {posargs} [testenv:pep8] +basepython = python3 deps = {[testenv]deps} commands = @@ -49,15 +52,18 @@ commands = python setup.py check --restructuredtext --strict [testenv:genconfig] +basepython = python3 description = Generates sample configuration file for monasca-persister whitelist_externals = bash commands = oslo-config-generator --config-file=config-generator/persister.conf [testenv:venv] +basepython = python3 commands = {posargs} [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 @@ -66,6 +72,7 @@ deps = bindep commands = bindep test [testenv:flake8] +basepython = python3 commands = flake8 monasca_persister