summaryrefslogtreecommitdiff
path: root/guix/build/python-build-system.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-12-12 11:42:12 +0100
committerLudovic Courtès <ludo@gnu.org>2015-12-12 11:48:46 +0100
commite82e55e58c67b0215e768c4612ca542bc670f633 (patch)
tree856c4512fa1fbde59c1d9845c5a763ef8c4a14b4 /guix/build/python-build-system.scm
parent98bd851ee891ca4a84e061fe1e78ba78c292b096 (diff)
parente35dff973375266db253747140ddf25084ecddc2 (diff)
downloadguix-patches-e82e55e58c67b0215e768c4612ca542bc670f633.tar
guix-patches-e82e55e58c67b0215e768c4612ca542bc670f633.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/build/python-build-system.scm')
-rw-r--r--guix/build/python-build-system.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index 1ae42c00b4..8025b7fec6 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -136,11 +136,18 @@ installed with setuptools."
#t))
#t))
+(define* (set-SOURCE-DATE-EPOCH #:rest _)
+ "Set the 'SOURCE_DATE_EPOCH' environment variable."
+ ;; Use zero as the timestamp in .pyc files so that builds are deterministic.
+ ;; TODO: Remove it when this variable is set in GNU:%STANDARD-PHASES.
+ (setenv "SOURCE_DATE_EPOCH" "1"))
+
(define %standard-phases
;; 'configure' and 'build' phases are not needed. Everything is done during
;; 'install'.
(modify-phases gnu:%standard-phases
(add-after 'unpack 'ensure-no-mtimes-pre-1980 ensure-no-mtimes-pre-1980)
+ (add-after 'unpack 'set-SOURCE-DATE-EPOCH set-SOURCE-DATE-EPOCH)
(delete 'configure)
(replace 'install install)
(replace 'check check)