From 9820a6d4a0fb82cd97f62ada764af658a4a3e71d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 15 Nov 2015 00:25:55 +0100 Subject: 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. --- .../patches/python-2-deterministic-build-info.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gnu/packages/patches/python-2-deterministic-build-info.patch (limited to 'gnu/packages/patches/python-2-deterministic-build-info.patch') 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 + #endif + ++/* Deterministic date and time. */ ++#define DATE "Jan 1 1970" ++#define TIME "00:00:01" ++ + #ifndef DATE + #ifdef __DATE__ + #define DATE __DATE__ -- cgit v1.2.3