diff options
author | Doug Hellmann <doug@doughellmann.com> | 2018-06-06 14:50:07 -0400 |
---|---|---|
committer | Doug Hellmann <doug@doughellmann.com> | 2018-06-06 16:18:21 -0400 |
commit | bb234731d3ba2dc1a17d592f0d37a49e3bc74a95 (patch) | |
tree | 2a1bec9264ab2df552c1ea1dce0ab4c2823b8acd | |
parent | 2ac3ef36d2687f820cb44f6b27dd81ebf1c4165b (diff) |
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.
Decode the output of subprocess in doc/source/conf.py so that we always
have a string.
Change-Id: I17601d56b6e6d9d300bb07d8982a7bbde637822e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Notes
Notes (review):
Code-Review+2: Stephen Finucane <stephenfin@redhat.com>
Code-Review+2: Julien Danjou <julien@danjou.info>
Workflow+1: Julien Danjou <julien@danjou.info>
Code-Review+1: zhongshengping <chdzsp@163.com>
Code-Review+1: Nguyen Hai <nguyentrihai93@gmail.com>
Verified+2: Zuul
Submitted-by: Zuul
Submitted-at: Mon, 25 Jun 2018 14:10:26 +0000
Reviewed-on: https://review.openstack.org/572893
Project: openstack/tooz
Branch: refs/heads/master
-rw-r--r-- | doc/source/conf.py | 2 | ||||
-rw-r--r-- | tox.ini | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py index 2d26f1f..f718ee4 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py | |||
@@ -63,7 +63,7 @@ copyright = u'%s, OpenStack Foundation' % datetime.date.today().year | |||
63 | # | 63 | # |
64 | # The short X.Y version. | 64 | # The short X.Y version. |
65 | version = subprocess.Popen(['sh', '-c', 'cd ../..; python setup.py --version'], | 65 | version = subprocess.Popen(['sh', '-c', 'cd ../..; python setup.py --version'], |
66 | stdout=subprocess.PIPE).stdout.read() | 66 | stdout=subprocess.PIPE).stdout.read().decode('utf-8') |
67 | version = version.strip() | 67 | version = version.strip() |
68 | # The full version, including alpha/beta/rc tags. | 68 | # The full version, including alpha/beta/rc tags. |
69 | release = version | 69 | release = version |
@@ -3,7 +3,6 @@ minversion = 1.8 | |||
3 | envlist = py27,py35,py{27,35}-{zookeeper,redis,sentinel,memcached,postgresql,mysql,consul,etcd,etcd3,etcd3gw},pep8 | 3 | envlist = py27,py35,py{27,35}-{zookeeper,redis,sentinel,memcached,postgresql,mysql,consul,etcd,etcd3,etcd3gw},pep8 |
4 | 4 | ||
5 | [testenv] | 5 | [testenv] |
6 | basepython = python3 | ||
7 | # We need to install a bit more than just `test' because those drivers have | 6 | # We need to install a bit more than just `test' because those drivers have |
8 | # custom tests that we always run | 7 | # custom tests that we always run |
9 | deps = .[test,zake,ipc,memcached,mysql,etcd,etcd3,etcd3gw] | 8 | deps = .[test,zake,ipc,memcached,mysql,etcd,etcd3,etcd3gw] |
@@ -40,18 +39,22 @@ commands = | |||
40 | basepython = python2.7 | 39 | basepython = python2.7 |
41 | 40 | ||
42 | [testenv:venv] | 41 | [testenv:venv] |
42 | basepython = python3 | ||
43 | # This target is used by the gate go run Sphinx to build the doc | 43 | # This target is used by the gate go run Sphinx to build the doc |
44 | deps = {[testenv:docs]deps} | 44 | deps = {[testenv:docs]deps} |
45 | commands = {posargs} | 45 | commands = {posargs} |
46 | 46 | ||
47 | [testenv:cover] | 47 | [testenv:cover] |
48 | basepython = python3 | ||
48 | commands = python setup.py testr --slowest --coverage --testr-args="{posargs}" | 49 | commands = python setup.py testr --slowest --coverage --testr-args="{posargs}" |
49 | 50 | ||
50 | [testenv:docs] | 51 | [testenv:docs] |
52 | basepython = python3 | ||
51 | deps = -r{toxinidir}/doc/requirements.txt | 53 | deps = -r{toxinidir}/doc/requirements.txt |
52 | commands = sphinx-build -W -b html doc/source doc/build/html | 54 | commands = sphinx-build -W -b html doc/source doc/build/html |
53 | 55 | ||
54 | [testenv:pep8] | 56 | [testenv:pep8] |
57 | basepython = python3 | ||
55 | deps = hacking<0.13,>=0.12 | 58 | deps = hacking<0.13,>=0.12 |
56 | doc8 | 59 | doc8 |
57 | commands = | 60 | commands = |
@@ -63,5 +66,6 @@ exclude=.venv,.git,.tox,dist,*egg,*.egg-info,build,examples,doc | |||
63 | show-source = True | 66 | show-source = True |
64 | 67 | ||
65 | [testenv:releasenotes] | 68 | [testenv:releasenotes] |
69 | basepython = python3 | ||
66 | deps = -r{toxinidir}/doc/requirements.txt | 70 | deps = -r{toxinidir}/doc/requirements.txt |
67 | commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html | 71 | commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |