aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-11-15 00:25:55 +0100
committerLudovic Courtès <ludo@gnu.org>2015-11-29 22:59:28 +0100
commit9820a6d4a0fb82cd97f62ada764af658a4a3e71d (patch)
tree610cf1eed4ca9a2ba2864ef362ba106ac0042fbd /gnu/packages/patches
parenta665996f58764a0c6e805016915225f911294989 (diff)
downloadguix-9820a6d4a0fb82cd97f62ada764af658a4a3e71d.tar
guix-9820a6d4a0fb82cd97f62ada764af658a4a3e71d.tar.gz
gnu: python: Make 'sys.version' deterministic.
* gnu/packages/patches/python-2-deterministic-build-info.patch, gnu/packages/patches/python-3-deterministic-build-info.patch: New files. * gnu/packages/python.scm (python-2, python): Use them. * gnu-system.am (dist_patch_DATA): Add them.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/python-2-deterministic-build-info.patch17
-rw-r--r--gnu/packages/patches/python-3-deterministic-build-info.patch17
2 files changed, 34 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-2-deterministic-build-info.patch b/gnu/packages/patches/python-2-deterministic-build-info.patch
new file mode 100644
index 0000000000..25a079fe90
--- /dev/null
+++ b/gnu/packages/patches/python-2-deterministic-build-info.patch
@@ -0,0 +1,17 @@
+Always provide the same date and time in 'Py_GetBuildInfo'.
+This is the information shown at the REPL and in 'sys.version'.
+We cannot pass it in CPPFLAGS due to whitespace in the DATE string.
+
+--- a/Modules/getbuildinfo.c
++++ b/Modules/getbuildinfo.c
+@@ -4,6 +4,10 @@
+ #include <stdio.h>
+ #endif
+
++/* Deterministic date and time. */
++#define DATE "Jan 1 1970"
++#define TIME "00:00:01"
++
+ #ifndef DATE
+ #ifdef __DATE__
+ #define DATE __DATE__
diff --git a/gnu/packages/patches/python-3-deterministic-build-info.patch b/gnu/packages/patches/python-3-deterministic-build-info.patch
new file mode 100644
index 0000000000..22c372a0cf
--- /dev/null
+++ b/gnu/packages/patches/python-3-deterministic-build-info.patch
@@ -0,0 +1,17 @@
+Always provide the same date and time in 'Py_GetBuildInfo'.
+This is the information shown at the REPL and in 'sys.version'.
+We cannot pass it in CPPFLAGS due to whitespace in the DATE string.
+
+--- Modules/getbuildinfo.c
++++ Modules/getbuildinfo.c
+@@ -4,6 +4,10 @@
+ #include <stdio.h>
+ #endif
+
++/* Deterministic date and time. */
++#define DATE "Jan 1 1970"
++#define TIME "00:00:01"
++
+ #ifndef DATE
+ #ifdef __DATE__
+ #define DATE __DATE__