-
-
Notifications
You must be signed in to change notification settings - Fork 650
Closed
Labels
Can Close?Will close in 30 days if there is no new activityWill close in 30 days if there is no new activity
Description
When a py_binary is built, the resulting executable is expanded from the template python_bootstrap_template.txt.
As of Bazel 7, py_runtime allows specifying this template. This allows us to customize program startup without changes in Bazel itself.
I copied the one in Bazel into rules_python, it lives here: https://github.com/bazelbuild/rules_python/blob/main/python/private/python_bootstrap_template.txt#L4
The basic todos are:
- Change toolchain generation code, the part that creates
py_runtime(), and add a version check for Bazel 7. If its Bazel 7, setbootstrap_templateto the rules python template.
The benefits of this are:
- We can now have python version specific bootstrap templates. Or other platform-specific templates.
- We can use some shell tricks to help solve py_binary with hermetic toolchain requires a system interpreter #691. I'm not sure we can entirely solve it, but we probably get close enough.
groodt, arrdem, aignas and IevgeniiB
Metadata
Metadata
Assignees
Labels
Can Close?Will close in 30 days if there is no new activityWill close in 30 days if there is no new activity