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

+ 6
- 1
tox.ini View File

@@ -3,7 +3,6 @@ minversion = 2.0
3 3
 envlist = py35,py27,pep8
4 4
 
5 5
 [testenv]
6
-basepython = python3
7 6
 deps =
8 7
   -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
9 8
   -r{toxinidir}/test-requirements.txt
@@ -15,6 +14,7 @@ commands = python setup.py testr --slowest --testr-args='{posargs}'
15 14
 basepython = python2.7
16 15
 
17 16
 [testenv:pep8]
17
+basepython = python3
18 18
 deps =
19 19
   -r{toxinidir}/test-requirements.txt
20 20
 commands =
@@ -23,12 +23,15 @@ commands =
23 23
   bandit -r oslo_reports tests -n5 --skip B314,B405
24 24
 
25 25
 [testenv:venv]
26
+basepython = python3
26 27
 commands = {posargs}
27 28
 
28 29
 [testenv:docs]
30
+basepython = python3
29 31
 commands = python setup.py build_sphinx
30 32
 
31 33
 [testenv:cover]
34
+basepython = python3
32 35
 commands = python setup.py test --coverage --coverage-package-name=oslo_reports --testr-args='{posargs}'
33 36
 
34 37
 [flake8]
@@ -42,9 +45,11 @@ 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
 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
46 50
 
47 51
 [testenv:lower-constraints]
52
+basepython = python3
48 53
 deps =
49 54
   -c{toxinidir}/lower-constraints.txt
50 55
   -r{toxinidir}/test-requirements.txt

Loading…
Cancel
Save