Configure basepython to python3 09/16709/1
authorThanh Ha <zxiiro@gmail.com>
Tue, 27 Aug 2019 19:15:15 +0000 (15:15 -0400)
committerThanh Ha <zxiiro@gmail.com>
Tue, 27 Aug 2019 19:15:48 +0000 (15:15 -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: Id39458360af83668d41d61eb3185fdde0894f3f7

tox.ini

diff --git a/tox.ini b/tox.ini
index 7300fdf..0818f5e 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -2,26 +2,19 @@
 minversion = 1.6
 envlist =
     check-best-practices,
-    check-hooks,
     coala,
     docs,
-    docs-linkcheck
+    docs-linkcheck,
+    pre-commit
 skipsdist=true
 
 [testenv]
 install_command=python -m pip install --no-cache-dir {opts} {packages}
 
 [testenv:check-best-practices]
+basepython = python3
 commands = python {toxinidir}/check-best-practices.py
 
-[testenv:check-hooks]
-deps =
-    more-itertools~=5.0.0
-    pre-commit
-commands =
-    pre-commit install
-    pre-commit run --all-files
-
 [testenv:coala]
 basepython = python3
 deps =
@@ -39,10 +32,20 @@ commands =
     coala --non-interactive
 
 [testenv:docs]
+basepython = python3
 deps = -rrequirements.txt
 commands =
     sphinx-build -j auto -W -b html -n -W -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
 
 [testenv:docs-linkcheck]
+basepython = python3
 deps = -rrequirements.txt
 commands = sphinx-build -j auto -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
+
+[testenv:pre-commit]
+basepython = python3
+deps =
+    pre-commit
+commands =
+    pre-commit install
+    pre-commit run --all-files