summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorEric Fried <openstack@fried.cc>2019-02-12 10:24:50 -0600
committerEric Fried <openstack@fried.cc>2019-02-12 10:24:50 -0600
commit590a2b6bbf71294d187d7082cc302069797db029 (patch)
treee080a8528509ea98cac61e0f27f5e2f72bee0d68 /tox.ini
parent95287619c9f59ea91537ac5789dda25aab41f5f6 (diff)
downloadnova-590a2b6bbf71294d187d7082cc302069797db029.tar.gz
tox: Don't write byte code (maybe)
In tox versions after 3.0.0rc1 [1], setting the environment variable PYTHONDONTWRITEBYTECODE will cause tox not to write .pyc files, which means you don't have to delete them, which makes things faster. In older tox versions, the env var is ignored. If we bump the minimum tox version to something later than 3.0.0rc1, we can remove the commands that find and remove .pyc files. [1] https://github.com/tox-dev/tox/commit/336f4f6bd8b53223f940fc5cfc43b1bbd78d4699 Change-Id: I779a17afade78997ab084909a9e6a46b0f91f055
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini3
1 files changed, 3 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
index 0aabcda397..a023aae84c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -19,6 +19,9 @@ setenv =
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=160
+ # NOTE(efried): This is only effective in tox versions after 3.0.0rc1
+ # https://github.com/tox-dev/tox/commit/336f4f6bd8b53223f940fc5cfc43b1bbd78d4699
+ PYTHONDONTWRITEBYTECODE=1
# TODO(stephenfin): Remove psycopg2 when minimum constraints is bumped to 2.8
PYTHONWARNINGS = ignore::UserWarning:psycopg2
deps = -r{toxinidir}/test-requirements.txt