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: Ia0bccf6ed1b28f64622217d88dc6401ba6bd4406
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Doug Hellmann 10 months ago
parent
commit
31d31ab699
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
 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}
@@ -18,6 +17,7 @@ commands =
18 17
 basepython = python2.7
19 18
 
20 19
 [testenv:pep8]
20
+basepython = python3
21 21
 deps =
22 22
   -r{toxinidir}/test-requirements.txt
23 23
 commands =
@@ -26,12 +26,15 @@ commands =
26 26
   bandit -r oslo_concurrency -x tests -n5 --skip B311,B404,B603,B606
27 27
 
28 28
 [testenv:venv]
29
+basepython = python3
29 30
 commands = {posargs}
30 31
 
31 32
 [testenv:docs]
33
+basepython = python3
32 34
 commands = python setup.py build_sphinx
33 35
 
34 36
 [testenv:cover]
37
+basepython = python3
35 38
 commands = python setup.py test --coverage --coverage-package-name=oslo_concurrency --testr-args='{posargs}'
36 39
 
37 40
 [flake8]
@@ -44,9 +47,11 @@ import_exceptions =
44 47
   oslo_concurrency._i18n
45 48
 
46 49
 [testenv:releasenotes]
50
+basepython = python3
47 51
 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
48 52
 
49 53
 [testenv:lower-constraints]
54
+basepython = python3
50 55
 deps =
51 56
   -c{toxinidir}/lower-constraints.txt
52 57
   -r{toxinidir}/test-requirements.txt

Loading…
Cancel
Save