From 9a93adcb2f437ea0c62306bb3672f718d7c19cec Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Sun, 22 Feb 2026 17:09:00 -0800 Subject: [PATCH 1/2] chore: repleace version marker in features.bzl (cherry picked from commit 3ddb6015b7cc575665c78c23d3d75c373aeb89a5) --- python/features.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/features.bzl b/python/features.bzl index 5e3b7410a7..26acc8c5fe 100644 --- a/python/features.bzl +++ b/python/features.bzl @@ -26,7 +26,7 @@ def _features_typedef(): A map of public API targets available in rules_python for feature detection purposes. - :::{versionadded} VERSION_NEXT_FEATURE + :::{versionadded} 1.9.0 ::: :::: From 7f6b275582b96da0c8e3d9f5cc1619f667a0da60 Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Tue, 24 Feb 2026 01:22:37 +0900 Subject: [PATCH 2/2] feat(pypi): make whl_library reproducible under pipstar (#3589) This is testing the new API to make use of remote caching mechanisms. Needs: https://github.com/bazelbuild/bazel/pull/27634 --------- Co-authored-by: Richard Levasseur (cherry picked from commit 06aa36daba6377bdeaf90309c73da22ca1afa153) --- python/private/pypi/whl_library.bzl | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/python/private/pypi/whl_library.bzl b/python/private/pypi/whl_library.bzl index db2b6bc770..8a8c6e53cf 100644 --- a/python/private/pypi/whl_library.bzl +++ b/python/private/pypi/whl_library.bzl @@ -548,7 +548,12 @@ def _whl_library_impl(rctx): paths.extend(path.readdir()) rctx.file("BUILD.bazel", build_file_contents) - return + + if enable_pipstar and enable_pipstar_extract: + if hasattr(rctx, "repo_metadata"): + return rctx.repo_metadata(reproducible = True) + + return None def _generate_entry_point_contents( module, @@ -690,7 +695,13 @@ whl_library = repository_rule( attrs = whl_library_attrs, doc = """ Download and extracts a single wheel based into a bazel repo based on the requirement string passed in. -Instantiated from pip_repository and inherits config options from there.""", +Instantiated from pip_repository and inherits config options from there. + +:::{versionchanged} 1.9.0 +The `whl_library` is marked as reproducible if using starlark to extract and parse the +wheel contents without building an `sdist` first. +::: +""", implementation = _whl_library_impl, environ = [ "RULES_PYTHON_PIP_ISOLATED",