diff options
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/patches/python-2-deterministic-build-info.patch | 17 | ||||
-rw-r--r-- | gnu/packages/patches/python-3-deterministic-build-info.patch | 17 | ||||
-rw-r--r-- | gnu/packages/python.scm | 2 |
3 files changed, 36 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__ diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 7f7fa388a1..fa8f203828 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -94,6 +94,7 @@ "1h7zbrf9pkj29hlm18b10548ch9757f75m64l47sy75rh43p7lqw")) (patches (map search-patch '("python-2.7-search-paths.patch" + "python-2-deterministic-build-info.patch" "python-2.7-source-date-epoch.patch"))))) (build-system gnu-build-system) (arguments @@ -223,6 +224,7 @@ data types.") '("python-fix-tests.patch" ;; XXX Try removing this patch for python > 3.4.3 "python-disable-ssl-test.patch" + "python-3-deterministic-build-info.patch" "python-3-search-paths.patch"))) (patch-flags '("-p0")) (sha256 |