Skip to content

Commit 544f0e2

Browse files
committed
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: I051f1c18b719a27372b626d483e47327085dd3b7 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
1 parent 01c3548 commit 544f0e2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tox.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ commands =
2424
{toxinidir}/tools/fast8.sh
2525

2626
[testenv:pep8]
27+
basepython = python3
2728
commands =
2829
flake8
2930
bandit -r openstackclient -x tests -s B105,B106,B107,B401,B404,B603,B606,B607,B110,B605,B101
@@ -87,13 +88,15 @@ commands =
8788
{toxinidir}/openstackclient/tests/functional/run_stestr.sh {posargs}
8889

8990
[testenv:venv]
91+
basepython = python3
9092
deps =
9193
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
9294
-r{toxinidir}/requirements.txt
9395
-r{toxinidir}/doc/requirements.txt
9496
commands = {posargs}
9597

9698
[testenv:cover]
99+
basepython = python3
97100
setenv =
98101
VIRTUAL_ENV={envdir}
99102
PYTHON=coverage run --source openstackclient --parallel-mode
@@ -109,6 +112,7 @@ commands =
109112
oslo_debug_helper -t openstackclient/tests {posargs}
110113

111114
[testenv:docs]
115+
basepython = python3
112116
deps =
113117
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
114118
-r{toxinidir}/requirements.txt
@@ -118,6 +122,7 @@ commands =
118122
sphinx-build -a -E -W -d doc/build/doctrees -b man doc/source doc/build/man
119123

120124
[testenv:releasenotes]
125+
basepython = python3
121126
deps =
122127
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
123128
-r{toxinidir}/doc/requirements.txt

0 commit comments

Comments
 (0)