gnu: Python: Delete existing compiled files before compiling bytecode.
* gnu/packages/python.scm (python-3.9)[arguments]: Delete existing pycs before calling "compileall".master
parent
7c2c698862
commit
65c5efd14e
|
@ -533,6 +533,14 @@ data types.")
|
||||||
;; Disable hash randomization to ensure the generated .pycs
|
;; Disable hash randomization to ensure the generated .pycs
|
||||||
;; are reproducible.
|
;; are reproducible.
|
||||||
(setenv "PYTHONHASHSEED" "0")
|
(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
|
(apply invoke
|
||||||
`(,,(if (%current-target-system)
|
`(,,(if (%current-target-system)
|
||||||
"python3"
|
"python3"
|
||||||
|
|
Reference in New Issue