Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-29708: support SOURCE_DATE_EPOCH for build info #5313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

bpo-29708: support SOURCE_DATE_EPOCH for build info #5313

wants to merge 1 commit into from

Conversation

commodo
Copy link
Contributor

@commodo commodo commented Jan 25, 2018

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>
@csabella csabella requested a review from vstinner January 26, 2020 23:58
@vstinner vstinner closed this May 3, 2021
@vstinner vstinner deleted the branch python:master May 3, 2021 21:29
Sign up for free to 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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.