Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/features.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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
:::
::::

Expand Down
15 changes: 13 additions & 2 deletions python/private/pypi/whl_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand Down