Browse Source

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: Ib73cac0235c6213645187ec52c719c8403eede5c
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Doug Hellmann 10 months ago
parent
commit
f0ad977c13
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      tox.ini

+ 4
- 0
tox.ini View File

@@ -20,15 +20,18 @@ commands =
20 20
   bandit -r oslo_context -x tests -n5
21 21
 
22 22
 [testenv:venv]
23
+basepython = python3
23 24
 commands = {posargs}
24 25
 
25 26
 [testenv:docs]
27
+basepython = python3
26 28
 deps =
27 29
   -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
28 30
   -r{toxinidir}/doc/requirements.txt
29 31
 commands = sphinx-build -W -b html doc/source doc/build/html
30 32
 
31 33
 [testenv:cover]
34
+basepython = python3
32 35
 commands = python setup.py test --coverage --coverage-package-name=oslo_context --testr-args='{posargs}'
33 36
 
34 37
 [flake8]
@@ -42,6 +45,7 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
42 45
 import_exceptions =
43 46
 
44 47
 [testenv:releasenotes]
48
+basepython = python3
45 49
 deps =
46 50
   -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
47 51
   -r{toxinidir}/doc/requirements.txt

Loading…
Cancel
Save