diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-11-14 00:08:35 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-11-29 22:59:28 +0100 |
commit | dedc8320701b3f5d23ccc213c1c0381e00b33785 (patch) | |
tree | 133d1909dd2a2ae83440d9674a6ae5d0fe3afcab /gnu/packages/python.scm | |
parent | f8e7fdc4165afa8c54638bcc8c40da91bf7c9618 (diff) | |
download | patches-dedc8320701b3f5d23ccc213c1c0381e00b33785.tar patches-dedc8320701b3f5d23ccc213c1c0381e00b33785.tar.gz |
gnu: python-2: Honor 'SOURCE_DATE_EPOCH'.
* gnu/packages/patches/python-2.7-source-date-epoch.patch: New file.
* gnu/packages/python.scm (python-2)[source]: Use it.
[arguments]: Set SOURCE_DATE_EPOCH in 'patch-lib-shells' phase.
* guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): New
procedure.
(%standard-phases): Add it.
* gnu-system.am (dist_patch_DATA): Add patch.
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r-- | gnu/packages/python.scm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 001d00e9be..07725c727a 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -92,7 +92,9 @@ (sha256 (base32 "1h7zbrf9pkj29hlm18b10548ch9757f75m64l47sy75rh43p7lqw")) - (patches (list (search-patch "python-2.7-search-paths.patch"))))) + (patches (map search-patch + '("python-2.7-search-paths.patch" + "python-2.7-source-date-epoch.patch"))))) (build-system gnu-build-system) (arguments `(#:tests? #f @@ -158,6 +160,11 @@ "Lib/distutils/tests/test_spawn.py" "Lib/test/test_subprocess.py")) (("/bin/sh") (which "sh"))) + + ;; Use zero as the timestamp in .pyc files so that builds are + ;; deterministic. TODO: Remove it when this variable is set in + ;; gnu-build-system.scm. + (setenv "SOURCE_DATE_EPOCH" "0") #t)) (add-before 'check 'pre-check |