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

+ 8
- 0
tox.ini View File

@@ -26,6 +26,7 @@ basepython = python2.7
26 26
 setenv = OS_TEST_PATH=./kuryr/tests/fullstack
27 27
 
28 28
 [testenv:debug]
29
+basepython = python3
29 30
 commands = oslo_debug_helper -t kuryr/tests {posargs}
30 31
 
31 32
 [testenv:debug-py27]
@@ -37,18 +38,22 @@ basepython = python3.5
37 38
 commands = oslo_debug_helper -t kuryr/tests {posargs}
38 39
 
39 40
 [testenv:pep8]
41
+basepython = python3
40 42
 commands = flake8
41 43
 
42 44
 [testenv:venv]
45
+basepython = python3
43 46
 commands = {posargs}
44 47
 
45 48
 [testenv:cover]
49
+basepython = python3
46 50
 commands =
47 51
   python setup.py test --coverage --testr-args='{posargs}' \
48 52
     --coverage-package-name=kuryr.lib
49 53
   coverage report
50 54
 
51 55
 [testenv:docs]
56
+basepython = python3
52 57
 commands = python setup.py build_sphinx
53 58
 
54 59
 [flake8]
@@ -63,6 +68,7 @@ show-source = true
63 68
 exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios,releasenotes
64 69
 
65 70
 [testenv:pylint]
71
+basepython = python3
66 72
 deps =
67 73
   {[testenv]deps}
68 74
   pylint
@@ -74,9 +80,11 @@ import_exceptions = neutron.i18n
74 80
 local-check-factory = neutron_lib.hacking.checks.factory
75 81
 
76 82
 [testenv:genconfig]
83
+basepython = python3
77 84
 commands = oslo-config-generator --config-file=etc/kuryr-config-generator.conf
78 85
 
79 86
 [testenv:releasenotes]
87
+basepython = python3
80 88
 commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
81 89
 
82 90
 [testenv:lower-constraints]

Loading…
Cancel
Save