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: I286299b3ef10c008e73900e0d08a461637796b67
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
tags/0.26.0
Doug Hellmann 1 year ago
parent
commit
8b50ec329b
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      tox.ini

+ 5
- 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
 install_command = pip install {opts} {packages}
8 7
 deps =
9 8
        -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
@@ -16,15 +15,19 @@ commands =
16 15
 basepython = python2.7
17 16
 
18 17
 [testenv:docs]
18
+basepython = python3
19 19
 commands = python setup.py build_sphinx
20 20
 
21 21
 [testenv:pep8]
22
+basepython = python3
22 23
 commands = flake8
23 24
 
24 25
 [testenv:venv]
26
+basepython = python3
25 27
 commands = {posargs}
26 28
 
27 29
 [testenv:cover]
30
+basepython = python3
28 31
 commands =
29 32
   python setup.py testr --coverage
30 33
 
@@ -34,6 +37,7 @@ ignore = E721
34 37
 exclude=.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg
35 38
 
36 39
 [testenv:lower-constraints]
40
+basepython = python3
37 41
 deps =
38 42
   -c{toxinidir}/lower-constraints.txt
39 43
   -r{toxinidir}/test-requirements.txt

Loading…
Cancel
Save