- https://rules-python.readthedocs.io/en/latest/changelog.html#v1-7.0 (see sys.path order change and bootstraping)
- pipstar flag default has been flipped to be on by default. It can be disabled through RULES_PYTHON_ENABLE_PIPSTAR=0 environment variable
1. Replace native bazel py_binary/py_library rules with rules_python's py_binary and py_library to selected BUILD files affected with updated to avoid %interpreter% error
2. Export PYTHONPATH build_pip_package.py
3. Add new commit sha and version for rules_python 1.8.4. Rules_python 1.8.4 added "scope" params to bool_flag and string_flag which is incompatible with bazel 7.7.0 used by TF, for now we can patch it
5. add flags RULES_PYTHON_ENABLE_PIPSTAR=0
6. Update patches for rules_python
NOTE: below are important
7. Due to rules_python 1.8.4 not differentiating between freethread and non-freethread see: https://github.com/bazel-contrib/rules_python/blob/1.8.4/python/private/pypi/pip_repository.bzl#L111 we need to inject --abi and cp<version>t to --extra_pip_args for rules_python to download specific packages used for freethreaded if HERMETIC_PYTHON_VERSION=<version>-ft is used.
8. Update the _get_injected_local_wheels custom rule to inject a --find-links rather than <package_name> @ <local prefix> as rules_python 1.8.4 seems to drop the package causing it to not find the wheels
PiperOrigin-RevId: 878583333
The problem was that `@python_<>_host` repository wasn't aware of the python type (controlled by the build flag `@rules_python//python/config_settings:py_freethreaded`) and selected the first candidate, e.g. GIL version of the python.
PiperOrigin-RevId: 808825370
`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