A custom runtime can be specified by setting the `HERMETIC_PYTHON_URL`, which
may point to a mostly arbitrary URL, i.e. one not following the same format
as python-build-standalone URLs, such e.g. `file:///__w/jax/jax/python-tsan.tgz`.
Internally, some rules_python code assumes the python-build-standalone URL
format and eventually errors.
To fix, the python version is used to determine the URL build suffix.
This also patches the rule_python versions URL generation logic to add musl
to the list of platforms it generates freethreaded runtime urls for.
Work around for https://github.com/bazel-contrib/rules_python/issues/3285, https://github.com/bazel-contrib/rules_python/issues/3286
PiperOrigin-RevId: 810132685
`com_google_protobuf` and `rules_cc` initialization was moved to `python_init_rules` macros.
The JAX repository update will be done [in the next step](https://github.com/jax-ml/jax/pull/31709)
PiperOrigin-RevId: 808689003
This allows downstream projects to apply project-specific patches without
having to redefine the entire rules_python repo and the custom patches.
PiperOrigin-RevId: 792220068
Forked from https://github.com/openxla/xla/pull/25183
Without this change rules_python doesn't correctly install free-threaded wheels for a free-threaded Python build.
PiperOrigin-RevId: 749128015
Imported from GitHub PR https://github.com/openxla/xla/pull/19346
cc @hawkinsp
Copybara import of the project:
--
292e7ebb7ee57e5af5977c08f0aaf28fc1f852e2 by vfdev-5 <vfdev.5@gmail.com>:
Bumped rules_python version to 0.39.0
Merging this change closes#19346
PiperOrigin-RevId: 699100796
TODO: once rules_python has 3.13 out of the box, the patch can be safely removed.
rules_python does not depend on rc versions of Python (seems to be against its philosophy), while JAX wants to support it, that is why adding RC support in a form of a patch instead of adding it directly to rules_python.
PiperOrigin-RevId: 675261914