7 Commits
Author SHA1 Message Date
Vladimir Belitskiy d3fa66c7b4 [CI] Update Bazel hermetic Python 3.14.2 -> 3.14.6.
PiperOrigin-RevId: 933303270
2026-06-16 14:38:28 -07:00
Ezekiel Calubaquib 0fa15d76e6 Update rules_python to latest 1.8.4 for tensorflow and xla. Doing so would enable us to use latest feature which includes a venv layout. This latest version also introduce stricter hermeticity which was first introduce in 1.7.0 as seen in logs:
- 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
2026-03-04 11:30:20 -08:00
Vladimir Belitskiy e76c22ae76 Update rules_python patch to map 3.14 to 3.14.2.
3.14.1+ fixes stack overflow detection, which is important for CI:
https://github.com/python/cpython/issues/139653

PiperOrigin-RevId: 860269037
2026-01-23 15:11:31 -08:00
Yulia Baturina f30bc84ef2 Updated python version from 3.13.6 to 3.13.11.
PiperOrigin-RevId: 842980941
2025-12-10 18:58:21 -08:00
Yulia Baturina b7ae3e4fcd Add released cpython 3.14 version in rules_python patch.
PiperOrigin-RevId: 816381097
2025-10-07 14:45:29 -07:00
A. Unique TensorFlower db851a6e99 Fix freethreaded aarch64 builds in JAX.
The urls for all python versions can use `pgo+lto-full`.

PiperOrigin-RevId: 810595592
2025-09-23 15:28:20 -07:00
A. Unique TensorFlower 62b4c5b763 Add rules_python_versions.patch to fix usage of custom python versions.
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
2025-09-22 13:32:10 -07:00