diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-11-20 01:00:25 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-11-20 09:12:32 -0500 |
commit | cf495c934e3cc9c642edb8ddb783db64618682a5 (patch) | |
tree | 80acc7a2a29ff6a9a315cb4d16b3c6bccdc6331a | |
parent | 4078b9acffa7e6e119bd3cd8dea720d1ae807dfb (diff) | |
download | guix-cf495c934e3cc9c642edb8ddb783db64618682a5.tar.gz guix-cf495c934e3cc9c642edb8ddb783db64618682a5.zip |
build-system/python: Set PYTHONDONTWRITEBYTECODE.
* guix/build/python-build-system.scm (enable-bytecode-determinism): Set
PYTHONDONTWRITEBYTECODE.
-rw-r--r-- | guix/build/python-build-system.scm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index 4a07496d22..1179315ce2 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -260,6 +260,9 @@ installed with setuptools." "Improve determinism of pyc files." ;; Use deterministic hashes for strings, bytes, and datetime objects. (setenv "PYTHONHASHSEED" "0") + ;; Prevent Python from creating .pyc files when loading modules (such as + ;; when running a test suite). + (setenv "PYTHONDONTWRITEBYTECODE" "1") #t) (define %standard-phases |