From ea562aba69d8ef8599abdaf2505e3f1f7ecf4d28 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 21 Jul 2021 23:54:10 +0200 Subject: 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. --- gnu/packages/python.scm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 74af5b3445..0ec790223e 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -26,7 +26,7 @@ ;;; Copyright © 2016, 2017 Nikita ;;; Copyright © 2016 Dylan Jeffers ;;; Copyright © 2016 David Craven -;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke +;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke ;;; Copyright © 2016, 2017 Stefan Reichör ;;; Copyright © 2016 Dylan Jeffers ;;; Copyright © 2016, 2017 Alex Vong @@ -502,7 +502,8 @@ (define-public python-3.9 ;; Delete .exe from embedded .whl (zip) files (for-each (lambda (whl) - (let ((dir "whl-content")) + (let ((dir "whl-content") + (circa-1980 (* 10 366 24 60 60))) (mkdir-p dir) (with-directory-excursion dir (let ((whl (string-append "../" whl))) @@ -510,8 +511,13 @@ (define-public python-3.9 (for-each delete-file (find-files "." "\\.exe$")) (delete-file whl) + ;; Reset timestamps to prevent them from ending + ;; up in the Zip archive. + (ftw "." (lambda (file stat flag) + (utime file circa-1980 circa-1980) + #t)) (apply invoke "zip" "-X" whl - (find-files "." ".*" #:directories? #t)))) + (find-files "." #:directories? #t)))) (delete-file-recursively dir))) (find-files "Lib/ensurepip" "\\.whl$")))) (add-before 'check 'set-TZDIR -- cgit v1.2.3