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

[bazel] Make pip wheels install reproducible #20872

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions third_party/python/pip.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ def _pip_wheel_impl(rctx):
rctx.report_progress("Installing the Python wheel package")
result = rctx.execute(
args,
environment = {
"SOURCE_DATE_EPOCH": "315532800",
"PYTHONHASHSEED": "0",
},
timeout = rctx.attr.timeout,
quiet = rctx.attr.quiet,
)
Expand All @@ -66,6 +70,10 @@ def _pip_wheel_impl(rctx):
rctx.report_progress("Pre-building Python wheels")
result = rctx.execute(
args,
environment = {
"SOURCE_DATE_EPOCH": "315532800",
"PYTHONHASHSEED": "0",
},
timeout = rctx.attr.timeout,
quiet = rctx.attr.quiet,
)
Expand All @@ -81,6 +89,10 @@ def _pip_wheel_impl(rctx):
rctx.report_progress("Generating sanitzed requirements file")
result = rctx.execute(
args,
environment = {
"SOURCE_DATE_EPOCH": "315532800",
"PYTHONHASHSEED": "0",
},
timeout = rctx.attr.timeout,
quiet = rctx.attr.quiet,
working_directory = "./",
Expand Down
Loading