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: I5078d8e6ab1cadd0d3780a3cd4ebc14c5f05dc69
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
tags/1.8.0
Doug Hellmann 11 months ago
parent
commit
6842b2d35a
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      tox.ini

+ 7
- 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 = find
9 8
                       rm
@@ -16,14 +15,17 @@ commands =
16 15
     sphinx-build -E -W -b doctest doc/source doc/build/doctest
17 16
 
18 17
 [testenv:pep8]
18
+basepython = python3
19 19
 commands =
20 20
     flake8
21 21
     doc8 doc/source
22 22
 
23 23
 [testenv:venv]
24
+basepython = python3
24 25
 commands = {posargs}
25 26
 
26 27
 [testenv:cover]
28
+basepython = python3
27 29
 commands =
28 30
   coverage erase
29 31
   find . -type f -name "*.pyc" -delete
@@ -34,11 +36,13 @@ commands =
34 36
 basepython = python2.7
35 37
 
36 38
 [testenv:docs]
39
+basepython = python3
37 40
 commands =
38 41
     rm -rf doc/build
39 42
     sphinx-build -E -W -b html doc/source doc/build/html
40 43
 
41 44
 [testenv:debug]
45
+basepython = python3
42 46
 commands = oslo_debug_helper {posargs}
43 47
 
44 48
 [flake8]
@@ -49,9 +53,11 @@ ignore = E123,E125
49 53
 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
50 54
 
51 55
 [testenv:releasenotes]
56
+basepython = python3
52 57
 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
53 58
 
54 59
 [testenv:lower-constraints]
60
+basepython = python3
55 61
 deps =
56 62
   -c{toxinidir}/lower-constraints.txt
57 63
   -r{toxinidir}/test-requirements.txt

Loading…
Cancel
Save