Skip to content

bpo-29708: support SOURCE_DATE_EPOCH for build info - #5313

Closed
commodo wants to merge 1 commit into
python:masterfrom
commodo:bpo-29708-makefile
Closed

bpo-29708: support SOURCE_DATE_EPOCH for build info#5313
commodo wants to merge 1 commit into
python:masterfrom
commodo:bpo-29708-makefile

Conversation

@commodo

@commodocommodo commented Jan 25, 2018

Copy link
Copy Markdown
Contributor

The Modules/getbuildinfo.c file 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

https://bugs.python.org/issue29708

The `Modules/getbuildinfo.c` file 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>
@vstinnervstinner closed this May 3, 2021
@vstinner
vstinner deleted the branch python:masterMay 3, 2021 21:29
@bmwiedemannbmwiedemannmannequin mentioned this pull request May 28, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@commodo@vstinner@the-knights-who-say-ni@bedevere-bot