summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Fried <openstack@fried.cc>2019-02-12 10:24:50 -0600
committerStephen Finucane <sfinucan@redhat.com>2019-02-14 10:50:01 +0000
commit6b1d576fdcaecd6c751862bebabd8f3e5fc3722d (patch)
tree1f3012dc7d3ebf1578f65503b5c8656f3776a8c6
parentb8702ded74aad826432dcedaf65535af52835aa5 (diff)
downloadnova-6b1d576fdcaecd6c751862bebabd8f3e5fc3722d.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. Conflicts: tox.ini NOTE(stephenfin): Additional stable/queens conflicts are due to a number of envvars not being set because we're still using testr here. NOTE(stephenfin): Conflict is due to a number of unrelated changes made during Rocky, such as Idda28f153d5054efc885ef2bde0989841df29cd3. [1] https://github.com/tox-dev/tox/commit/336f4f6bd8b53223f940fc5cfc43b1bbd78d4699 Change-Id: I779a17afade78997ab084909a9e6a46b0f91f055 (cherry picked from commit 590a2b6bbf71294d187d7082cc302069797db029) (cherry picked from commit 99f0c4c0144a551f0fa7f3a8847327660e5ccb89) (cherry picked from commit 643908ad3a36bc9ad182d79f26dcc6212c638696)
-rw-r--r--tox.ini3
1 files changed, 3 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
index e71578e3b1..07c1b0bf23 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,6 +15,9 @@ setenv = VIRTUAL_ENV={envdir}
OS_TEST_PATH=./nova/tests/unit
LANGUAGE=en_US
LC_ALL=en_US.utf-8
+ # NOTE(efried): This is only effective in tox versions after 3.0.0rc1
+ # https://github.com/tox-dev/tox/commit/336f4f6bd8b53223f940fc5cfc43b1bbd78d4699
+ PYTHONDONTWRITEBYTECODE=1
deps = -r{toxinidir}/test-requirements.txt
# NOTE(mriedem): If py34 fails with "db type could not be determined", delete
# .testrepository and try again. Running py34 before py27 is OK, but not the