From 7834e2ea6b946ae5a0655d61507342ff920b9bd6 Mon Sep 17 00:00:00 2001 From: Nguyen Hung Phuong Date: Tue, 3 Jul 2018 09:46:26 +0700 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: I64d454d251712281911a1aa6e4ecd6139ad1bd8b --- tox.ini | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tox.ini b/tox.ini index 002ad7cf1..d33bb050d 100644 --- a/tox.ini +++ b/tox.ini @@ -16,14 +16,17 @@ passenv= DUMP_CONFIG_GRAPH [testenv:pep8] +basepython = python3 commands = flake8 {posargs} dib-lint [testenv:pylint] +basepython = python3 commands = pylint --rcfile pylint.cfg diskimage_builder [testenv:venv] +basepython = python3 commands = {posargs} [testenv:func] @@ -34,12 +37,15 @@ commands = {toxinidir}/tests/run_functests.sh {posargs} # NOTE: this is "setup.py test" (*not* testr) which is a pbr wrapper # around testr. This understands --coverage-package-name which we # need due to underscore issues. +basepython = python3 commands = python setup.py test --coverage --coverage-package-name diskimage_builder --testr-args='{posargs}' [testenv:docs] +basepython = python3 commands = python setup.py build_sphinx [testenv:releasenotes] +basepython = python3 commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [flake8]