python,python3: honour the SOURCE_DATE_EPOCH for the build-info 5360/head
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Sat, 6 Jan 2018 15:18:11 +0000 (17:18 +0200)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Mon, 8 Jan 2018 13:32:47 +0000 (15:32 +0200)
commitc54b312043d4bb373d82c45c77e7a7ee48e9b0ac
tree9bf67c6ea2a1fbfc542a2ae339cc3f733f22d572
parentbc631e861c742191465df09912dd959dff2626b2
python,python3: honour the SOURCE_DATE_EPOCH for the build-info

The Modules/getbuildinfo.c allows the use of DATE and TIME
macros to be defined via CFLAGS.

These vars, control the build date & time when the
interpreter is opened, and can be read via the
`platform._sys_version()` function.

So, a conversion from SOURCE_DATE_EPOCH to DATE & TIME
is required at build-time.

This is especially needed for `platform._sys_version()`
to work.
The installation of pip seems to rely on this.

The logic has been adapted from:
 https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Makefile

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python/python/Makefile
lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch [new file with mode: 0644]
lang/python/python3/Makefile
lang/python/python3/patches/013-getbuildinfo-date-time-source-date-epoch.patch [new file with mode: 0644]