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)
downloadtooz-bb234731d3ba2dc1a17d592f0d37a49e3bc74a95.tar.gz
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>
-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
#
# The short X.Y version.
version = subprocess.Popen(['sh', '-c', 'cd ../..; python setup.py --version'],
- stdout=subprocess.PIPE).stdout.read()
+ stdout=subprocess.PIPE).stdout.read().decode('utf-8')
version = version.strip()
# The full version, including alpha/beta/rc tags.
release = 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
envlist = py27,py35,py{27,35}-{zookeeper,redis,sentinel,memcached,postgresql,mysql,consul,etcd,etcd3,etcd3gw},pep8
[testenv]
-basepython = python3
# We need to install a bit more than just `test' because those drivers have
# custom tests that we always run
deps = .[test,zake,ipc,memcached,mysql,etcd,etcd3,etcd3gw]
@@ -40,18 +39,22 @@ commands =
basepython = python2.7
[testenv:venv]
+basepython = python3
# This target is used by the gate go run Sphinx to build the doc
deps = {[testenv:docs]deps}
commands = {posargs}
[testenv:cover]
+basepython = python3
commands = python setup.py testr --slowest --coverage --testr-args="{posargs}"
[testenv:docs]
+basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pep8]
+basepython = python3
deps = hacking<0.13,>=0.12
doc8
commands =
@@ -63,5 +66,6 @@ exclude=.venv,.git,.tox,dist,*egg,*.egg-info,build,examples,doc
show-source = True
[testenv:releasenotes]
+basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html