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: I31a207868c07e08ae27c14635d52506021032cb7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Doug Hellmann 10 months ago
parent
commit
69b23ef7de
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,pep8
4 4
 
5 5
 [testenv]
6
-basepython = python3
7 6
 install_command = pip install {opts} {packages}
8 7
 whitelist_externals = bash
9 8
                       env
@@ -26,6 +25,7 @@ commands =
26 25
 passenv = OS_TEST_DBAPI_ADMIN_CONNECTION
27 26
 
28 27
 [testenv:sqla_09]
28
+basepython = python3
29 29
 commands = pip install SQLAlchemy>=0.9.0,!=0.9.5,<1.0.0
30 30
             python setup.py testr --slowest --testr-args='{posargs}'
31 31
 
@@ -36,24 +36,29 @@ commands =
36 36
     env TEST_EVENTLET=1 bash tools/pretty_tox.sh '{posargs}'
37 37
 
38 38
 [testenv:pep8]
39
+basepython = python3
39 40
 commands =
40 41
   flake8
41 42
   # Run security linter
42 43
   bandit -r oslo_db -x tests -n5 --skip B105,B311
43 44
 
44 45
 [testenv:venv]
46
+basepython = python3
45 47
 commands = {posargs}
46 48
 
47 49
 [testenv:cover]
50
+basepython = python3
48 51
 commands = python setup.py test --coverage --coverage-package-name=oslo_db --testr-args='{posargs}'
49 52
 
50 53
 [testenv:docs]
54
+basepython = python3
51 55
 deps = -r{toxinidir}/doc/requirements.txt
52 56
 commands =
53 57
     doc8 -e .rst CONTRIBUTING.rst HACKING.rst README.rst doc/source
54 58
     sphinx-build -b html doc/source doc/build/html
55 59
 
56 60
 [testenv:releasenotes]
61
+basepython = python3
57 62
 deps = -r{toxinidir}/doc/requirements.txt
58 63
 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
59 64
 
@@ -68,6 +73,7 @@ import_exceptions =
68 73
   oslo_db._i18n
69 74
 
70 75
 [testenv:lower-constraints]
76
+basepython = python3
71 77
 deps =
72 78
   -c{toxinidir}/lower-constraints.txt
73 79
   -r{toxinidir}/test-requirements.txt

Loading…
Cancel
Save