summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2018-06-06 14:50:07 -0400
committerDoug Hellmann <doug@doughellmann.com>2018-06-06 16:18:21 -0400
commitbb234731d3ba2dc1a17d592f0d37a49e3bc74a95 (patch)
tree2a1bec9264ab2df552c1ea1dce0ab4c2823b8acd
parent2ac3ef36d2687f820cb44f6b27dd81ebf1c4165b (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.py2
-rw-r--r--tox.ini6
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.
65version = subprocess.Popen(['sh', '-c', 'cd ../..; python setup.py --version'], 65version = subprocess.Popen(['sh', '-c', 'cd ../..; python setup.py --version'],
66 stdout=subprocess.PIPE).stdout.read() 66 stdout=subprocess.PIPE).stdout.read().decode('utf-8')
67version = version.strip() 67version = version.strip()
68# The full version, including alpha/beta/rc tags. 68# The full version, including alpha/beta/rc tags.
69release = version 69release = version
diff --git a/tox.ini b/tox.ini
index 0d38b96..06ffeb0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,7 +3,6 @@ minversion = 1.8
3envlist = py27,py35,py{27,35}-{zookeeper,redis,sentinel,memcached,postgresql,mysql,consul,etcd,etcd3,etcd3gw},pep8 3envlist = py27,py35,py{27,35}-{zookeeper,redis,sentinel,memcached,postgresql,mysql,consul,etcd,etcd3,etcd3gw},pep8
4 4
5[testenv] 5[testenv]
6basepython = 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
9deps = .[test,zake,ipc,memcached,mysql,etcd,etcd3,etcd3gw] 8deps = .[test,zake,ipc,memcached,mysql,etcd,etcd3,etcd3gw]
@@ -40,18 +39,22 @@ commands =
40basepython = python2.7 39basepython = python2.7
41 40
42[testenv:venv] 41[testenv:venv]
42basepython = 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
44deps = {[testenv:docs]deps} 44deps = {[testenv:docs]deps}
45commands = {posargs} 45commands = {posargs}
46 46
47[testenv:cover] 47[testenv:cover]
48basepython = python3
48commands = python setup.py testr --slowest --coverage --testr-args="{posargs}" 49commands = python setup.py testr --slowest --coverage --testr-args="{posargs}"
49 50
50[testenv:docs] 51[testenv:docs]
52basepython = python3
51deps = -r{toxinidir}/doc/requirements.txt 53deps = -r{toxinidir}/doc/requirements.txt
52commands = sphinx-build -W -b html doc/source doc/build/html 54commands = sphinx-build -W -b html doc/source doc/build/html
53 55
54[testenv:pep8] 56[testenv:pep8]
57basepython = python3
55deps = hacking<0.13,>=0.12 58deps = hacking<0.13,>=0.12
56 doc8 59 doc8
57commands = 60commands =
@@ -63,5 +66,6 @@ exclude=.venv,.git,.tox,dist,*egg,*.egg-info,build,examples,doc
63show-source = True 66show-source = True
64 67
65[testenv:releasenotes] 68[testenv:releasenotes]
69basepython = python3
66deps = -r{toxinidir}/doc/requirements.txt 70deps = -r{toxinidir}/doc/requirements.txt
67commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html 71commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html