Skip to content
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

Make wheel build reproducible #1

Merged
merged 1 commit into from
Jun 20, 2020
Merged

Conversation

jacobbogdanov
Copy link

THIS IS A PORT OF apt-itude#43

(which can also be found here: https://github.com/128technology/rules_128tech/blob/master/thirdparty/pip/reproducible_wheel.patch)

When building wheels for packages, pip/bdist_wheel may not generate
the exact same binary output for C extensions for a few different
reasons:

  • current timestamp is used in the build, can be overridden via
    SOURCE_DATE_EPOCH environment variable

  • -g is used which adds a tmp directory file path to the debuginfo of
    the binary, can be overridden with CFLAGS environment variable

  • Python hashing with a random seed, can be overridden by
    PYTHONHASHSEED environment variable

See bazelbuild/rules_python#15) for more
details.

When building wheels for packages, `pip`/`bdist_wheel` may not generate
the exact same binary output for C extensions for a few different
reasons:

* current timestamp is used in the build, can be overridden via
`SOURCE_DATE_EPOCH` environment variable

* `-g` is used which adds a tmp directory file path to the debuginfo of
the binary, can be overridden with `CFLAGS` environment variable

* Python hashing with a random seed, can be overridden by
`PYTHONHASHSEED` environment variable

See bazelbuild/rules_python#15) for more
details.
Copy link
Member

@ian-h-chamberlain ian-h-chamberlain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you port over the CI as well? I think that was broken on apt-itude/rules_pip

@jacobbogdanov
Copy link
Author

I have not (yet).

Because this is a fork, I know we can't have issues, but I'm not sure if the same is true about CI. In either case we probably will want to change this to not be a fork, and instead be a standalone project, but one step at a time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants