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:17:02 -0400
commit236297973fad26dc512df0978b8f46995eea476c (patch)
tree4ee87670e2083ec657f13c0dc4d34e6364a9defb
parentf641e9aeaaede3a29a07e6382afce5622d207ea2 (diff)
downloadstevedore-236297973fad26dc512df0978b8f46995eea476c.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 subprocess output so it has the right type under python 3. Change-Id: Id2df5439fa6e788199bec4ac7c98c56347053621 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 1074cd5..915e879 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -74,7 +74,7 @@ copyright = u'2016, DreamHost'
#
# 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 1a5b0a7..006d0ad 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,7 +3,6 @@ minversion = 2.0
envlist = py35,py27,pep8,docs
[testenv]
-basepython = python3
install_command = pip install {opts} {packages}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
@@ -16,6 +15,7 @@ commands = python setup.py testr --testr-args='{posargs}'
basepython = python2.7
[testenv:venv]
+basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt
@@ -24,6 +24,7 @@ deps =
commands = {posargs}
[testenv:pep8]
+basepython = python3
deps =
-r{toxinidir}/test-requirements.txt
flake8
@@ -34,6 +35,7 @@ commands =
bandit -r stevedore -x tests -n5
[testenv:docs]
+basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
@@ -43,12 +45,14 @@ show-source = True
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build
[testenv:releasenotes]
+basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints]
+basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt