me
/
guix
Archived
1
0
Fork 0

gnu: Python: Delete existing compiled files before compiling bytecode.

* gnu/packages/python.scm (python-3.9)[arguments]: Delete existing pycs before
calling "compileall".
master
Marius Bakke 2021-07-22 00:05:45 +02:00
parent 7c2c698862
commit 65c5efd14e
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 8 additions and 0 deletions

View File

@ -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"