You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change toolchain generation code, the part that creates py_runtime(), and add a version check for Bazel 7. If its Bazel 7, set bootstrap_template to the rules python template.
The benefits of this are:
We can now have python version specific bootstrap templates. Or other platform-specific templates.
Yeah, I think so. The py_runtime implementation was switch over to starlark, and it gets its bootstrap from rules_python, which is used by py_binary.
For Bazel 6, we have to keep the template compatible across all python versions. With Bazel 7 we could (but don't currently) create a bootstrap for each specific version.
But yes, for the most part, rules_python does control it directly now.
This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days.
Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_python!
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:
py_runtime()
, and add a version check for Bazel 7. If its Bazel 7, setbootstrap_template
to the rules python template.The benefits of this are:
The text was updated successfully, but these errors were encountered: