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

Create a template to define a local Python toolchain for Bazel #2

Open
nicholasjng opened this issue Oct 1, 2024 · 0 comments
Open

Comments

@nicholasjng
Copy link
Owner

This technically goes against strict hermeticity, but in practice, it is such a natural thing to do that it would be very strange not to support it.

The main idea is to define a Bazel target for a locally installed Python instead of downloading a full Python toolchain from GitHub, as is done in the internals of rules_python.

Many projects such as Google Benchmark and re2 have done this for a while, and rules_python itself mentions the ability to define a local custom Python toolchain in its documentation (and on several issues and discussions).

In fact, given the rather high level of standardization of Python interpreters available on systems today through package managers and projects like python-build-standalone, we can probably assume any given interpreter on a user system as "reasonably hermetic".

What's necessary to support this is to define a good enough template for a Python toolchain to forward any local interpreter to Bazel.

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

No branches or pull requests

1 participant