Configure basepython to python3 07/16707/1
authorThanh Ha <zxiiro@gmail.com>
Tue, 27 Aug 2019 19:11:02 +0000 (15:11 -0400)
committerThanh Ha <zxiiro@gmail.com>
Tue, 27 Aug 2019 19:11:02 +0000 (15:11 -0400)
More and more libraries that we are pulling in require Python 3 so
to avoid having to play the pin dependencies whack-a-mole game let's
bump or base python where possible to python3.

This also renames the pre-commit env to the standard "pre-commit" name
that we use in other projects.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I66d1e72390ba682d0e7bd6fdbbb1a7cc3c8f929d

tox.ini

diff --git a/tox.ini b/tox.ini
index 0c2e341..253a27f 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -1,11 +1,11 @@
 [tox]
 minversion = 2.0
 envlist =
-    check-hooks,
     coala,
     docs,
     docs-linkcheck,
     license,
+    pre-commit,
     py27,
     py35,
     py36,
@@ -16,12 +16,6 @@ skip_missing_interpreters = true
 deps = -r{toxinidir}/requirements-test.txt
 commands = pytest
 
-[testenv:check-hooks]
-deps = pre-commit==1.11.2
-commands =
-    pre-commit install
-    pre-commit run --all-files
-
 [testenv:coala]
 basepython = python3
 deps =
@@ -37,29 +31,41 @@ commands =
     coala --non-interactive
 
 [testenv:docs]
+basepython = python3
 deps = -rrequirements-docs.txt
 extras = openstack
 commands =
     sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
 
 [testenv:docs-linkcheck]
+basepython = python3
 deps = -rrequirements-docs.txt
 extras = openstack
 commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
 
 [testenv:latest-upstream]
+basepython = python3
 deps = -r{toxinidir}/requirements-test.txt
 commands =
     pip install -U python-jenkins requests shade
     pytest
 
 [testenv:license]
+basepython = python3
 deps =
     lftools
 commands =
     lftools license check-dir lftools
     lftools license check-dir -r '.+' shell
 
+[testenv:pre-commit]
+basepython = python3
+deps = pre-commit
+commands =
+    pre-commit install
+    pre-commit run --all-files
+
 [testenv:reno]
+basepython = python3
 deps = reno
 commands = reno {posargs:--help}