summaryrefslogtreecommitdiff
path: root/gnu/packages/python.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r--gnu/packages/python.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 0b763af924..8a8fe2bd2a 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -533,6 +533,14 @@ data types.")
;; Disable hash randomization to ensure the generated .pycs
;; are reproducible.
(setenv "PYTHONHASHSEED" "0")
+
+ ;; XXX: Delete existing auto-generated pycs beforehand because
+ ;; the -f argument does not necessarily overwrite all files,
+ ;; leading to indeterministic results.
+ (for-each (lambda (pyc)
+ (delete-file pyc))
+ (find-files out "\\.pyc$"))
+
(apply invoke
`(,,(if (%current-target-system)
"python3"