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: Ib592f5d76510dcb3303e954307066675838d58b8
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Doug Hellmann 10 months ago
parent
commit
8b24f73506
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,pypy,pep8
4 4
 
5 5
 [testenv]
6
-basepython = python3
7 6
 install_command = pip install {opts} {packages}
8 7
 whitelist_externals =
9 8
  /bin/sh
@@ -17,6 +16,7 @@ commands = python setup.py testr --slowest --testr-args='{posargs}'
17 16
 basepython = python2.7
18 17
 
19 18
 [testenv:pep8]
19
+basepython = python3
20 20
 deps =
21 21
   -r{toxinidir}/test-requirements.txt
22 22
 commands =
@@ -25,12 +25,15 @@ commands =
25 25
   bandit -r oslo_privsep -x tests -n5 --skip B404,B603
26 26
 
27 27
 [testenv:venv]
28
+basepython = python3
28 29
 commands = {posargs}
29 30
 
30 31
 [testenv:docs]
32
+basepython = python3
31 33
 commands = python setup.py build_sphinx
32 34
 
33 35
 [testenv:cover]
36
+basepython = python3
34 37
 commands = python setup.py testr --coverage --testr-args='{posargs}'
35 38
 
36 39
 [flake8]
@@ -49,9 +52,11 @@ import_exceptions =
49 52
   oslo_privsep._i18n
50 53
 
51 54
 [testenv:releasenotes]
55
+basepython = python3
52 56
 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
53 57
 
54 58
 [testenv:lower-constraints]
59
+basepython = python3
55 60
 deps =
56 61
   -c{toxinidir}/lower-constraints.txt
57 62
   -r{toxinidir}/test-requirements.txt

Loading…
Cancel
Save