aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/python-2-deterministic-build-info.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches/python-2-deterministic-build-info.patch')
-rw-r--r--gnu/packages/patches/python-2-deterministic-build-info.patch17
1 files changed, 17 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__