From e31c139206b94dd73f08926b851091d1ad56e0ed Mon Sep 17 00:00:00 2001 From: "huang.zhiping" Date: Fri, 8 Jun 2018 22:57:56 +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: Ibb8ce8e655643161b0b7d4e84f0c2897e9c6417c --- tox.ini | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tox.ini b/tox.ini index 2ea622d5..2958dc60 100644 --- a/tox.ini +++ b/tox.ini @@ -25,10 +25,12 @@ commands = # mode. To do this define the TRACE_FAILONLY environmental variable. [testenv:pep8] +basepython = python3 commands = flake8 {posargs} [testenv:cover] +basepython = python3 # Also do not run test_coverage_ext tests while gathering coverage as those # tests conflict with coverage. commands = @@ -39,14 +41,17 @@ commands = coverage html --include='compute_hyperv/*' --omit='compute_hyperv/openstack/common/*' -d covhtml -i [testenv:venv] +basepython = python3 commands = {posargs} [testenv:docs] +basepython = python3 commands = python setup.py build_sphinx bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python' [testenv:releasenotes] +basepython = python3 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html @@ -70,6 +75,7 @@ enable-extensions = H904 local-check-factory = compute_hyperv.hacking.checks.factory [testenv:pip-missing-reqs] +basepython = python3 # do not install test-requirements as that will pollute the virtualenv for # determining missing packages # this also means that pip-missing-reqs must be installed separately, outside