diff options
| author | Marius Bakke <marius@gnu.org> | 2021-07-21 23:54:10 +0200 |
|---|---|---|
| committer | Marius Bakke <marius@gnu.org> | 2021-07-23 17:26:46 +0200 |
| commit | ea562aba69d8ef8599abdaf2505e3f1f7ecf4d28 (patch) | |
| tree | 32f09c59155eec96932a00f66b582031c53a862c /gnu/packages/python.scm | |
| parent | 09b002622e2113c2f14c11ccd43fa01fd343fb95 (diff) | |
gnu: Python: Do not embed timestamps in wheel files.
* gnu/packages/python.scm (python-3.9)[arguments]: Reset timestamps before
zipping wheels. While at it, remove redundant regex argument.
Diffstat (limited to 'gnu/packages/python.scm')
| -rw-r--r-- | gnu/packages/python.scm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 74af5b3445d..0ec790223e9 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is> | 26 | ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is> |
| 27 | ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org> | 27 | ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org> |
| 28 | ;;; Copyright © 2016 David Craven <david@craven.ch> | 28 | ;;; Copyright © 2016 David Craven <david@craven.ch> |
| 29 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com> | 29 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org> |
| 30 | ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at> | 30 | ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at> |
| 31 | ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org> | 31 | ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org> |
| 32 | ;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com> | 32 | ;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com> |
| @@ -502,7 +502,8 @@ data types.") | |||
| 502 | ;; Delete .exe from embedded .whl (zip) files | 502 | ;; Delete .exe from embedded .whl (zip) files |
| 503 | (for-each | 503 | (for-each |
| 504 | (lambda (whl) | 504 | (lambda (whl) |
| 505 | (let ((dir "whl-content")) | 505 | (let ((dir "whl-content") |
| 506 | (circa-1980 (* 10 366 24 60 60))) | ||
| 506 | (mkdir-p dir) | 507 | (mkdir-p dir) |
| 507 | (with-directory-excursion dir | 508 | (with-directory-excursion dir |
| 508 | (let ((whl (string-append "../" whl))) | 509 | (let ((whl (string-append "../" whl))) |
| @@ -510,8 +511,13 @@ data types.") | |||
| 510 | (for-each delete-file | 511 | (for-each delete-file |
| 511 | (find-files "." "\\.exe$")) | 512 | (find-files "." "\\.exe$")) |
| 512 | (delete-file whl) | 513 | (delete-file whl) |
| 514 | ;; Reset timestamps to prevent them from ending | ||
| 515 | ;; up in the Zip archive. | ||
| 516 | (ftw "." (lambda (file stat flag) | ||
| 517 | (utime file circa-1980 circa-1980) | ||
| 518 | #t)) | ||
| 513 | (apply invoke "zip" "-X" whl | 519 | (apply invoke "zip" "-X" whl |
| 514 | (find-files "." ".*" #:directories? #t)))) | 520 | (find-files "." #:directories? #t)))) |
| 515 | (delete-file-recursively dir))) | 521 | (delete-file-recursively dir))) |
| 516 | (find-files "Lib/ensurepip" "\\.whl$")))) | 522 | (find-files "Lib/ensurepip" "\\.whl$")))) |
| 517 | (add-before 'check 'set-TZDIR | 523 | (add-before 'check 'set-TZDIR |
