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: I3dc0d03eb3d9d41e3929d7e0e68ef93f45aef986
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 16:06:03 -04:00
parent 21b2c357fd
commit 43729dec6d
1 changed files with 14 additions and 0 deletions

14
tox.ini
View File

@ -23,53 +23,67 @@ whitelist_externals = bash
install_command = pip install -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata {opts} {packages}
[testenv:murano-test-runner]
basepython = python3
commands = murano-test-runner {posargs}
[testenv:pep8]
basepython = python3
commands =
flake8 {posargs}
{[testenv:bandit]commands}
[testenv:bandit]
basepython = python3
commands = bandit -c bandit.yaml -r murano -x tests -n 5 -ll
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
commands = {toxinidir}/tools/cover.sh {posargs}
[testenv:debug]
basepython = python3
commands =
find . -type f -name "*.pyc" -delete
oslo_debug_helper {posargs}
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
[testenv:pyflakes]
basepython = python3
deps = flake8
commands = flake8
[testenv:pylint]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
commands = bash tools/lintstack.sh
[testenv:genconfig]
basepython = python3
commands =
oslo-config-generator --config-file etc/oslo-config-generator/murano.conf
[testenv:gencfconfig]
basepython = python3
commands =
oslo-config-generator --config-file etc/oslo-config-generator/murano-cfapi.conf
[testenv:genpolicy]
basepython = python3
commands = oslopolicy-sample-generator --config-file etc/oslo-policy-generator/murano-policy-generator.conf
[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:api-ref]
basepython = python3
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
commands =