aboutsummaryrefslogtreecommitdiffstats
path: root/tox.ini
diff options
context:
space:
mode:
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini14
1 files changed, 8 insertions, 6 deletions
diff --git a/tox.ini b/tox.ini
index e0eef95a..8b34c235 100644
--- a/tox.ini
+++ b/tox.ini
@@ -7,14 +7,16 @@
[tox]
envlist=python
+[helpers]
+# Wrapper for calls to pip that make sure the version being used is a
+# up-to-date, and to prevent the current working directory from being
+# added to `sys.path`.
+pip = python {toxinidir}/tools/tox_pip.py
+
[testenv]
deps=-rtests/requirements.txt
-# Changed from default (`python -m pip ...`)
-# to prevent the current working directory
-# from being added to `sys.path`.
-install_command=python -c 'import sys; sys.path.remove(""); from pkg_resources import load_entry_point; load_entry_point("pip", "console_scripts", "pip")()' install {opts} {packages}
-# Same as above.
-list_dependencies_command={envbindir}/pip freeze --all
+install_command = {[helpers]pip} install {opts} {packages}
+list_dependencies_command = {[helpers]pip} freeze --all
setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname}
# TODO: The passed environment variables came from copying other tox.ini files
# These should probably be individually annotated to explain what needs them.