Skip to content

Commit cdecbae

Browse files
committed
chore: enable pipstar for experimental_index_url users
1 parent 728cce7 commit cdecbae

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ END_UNRELEASED_TEMPLATE
6767
### Changed
6868
* (toolchains) Use toolchains from the [20251031] release.
6969
* (gazelle) Internally split modules mapping generation to be per-wheel for concurrency and caching.
70+
* (pip) `pipstar` has been enabled for all `whl_library` instances where the whl
71+
is passed through a label or downloaded using the bazel downloader
72+
([#2949](https://github.com/bazel-contrib/rules_python/issues/2949)).
7073

7174
{#v0-0-0-fixed}
7275
### Fixed

python/private/pypi/whl_library.bzl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,11 @@ def _whl_library_impl(rctx):
324324

325325
args = _parse_optional_attrs(rctx, args, extra_pip_args)
326326

327-
if not whl_path:
327+
enable_pipstar = rp_config.enable_pipstar and rctx.attr.config_load
328+
if whl_path:
329+
# Enable pipstar for any whls that are downloaded without `pip`
330+
enable_pipstar = True
331+
else:
328332
if rctx.attr.urls:
329333
op_tmpl = "whl_library.BuildWheelFromSource({name}, {requirement})"
330334
elif rctx.attr.download_only:
@@ -374,7 +378,7 @@ def _whl_library_impl(rctx):
374378
# disable pipstar for that particular case.
375379
#
376380
# Remove non-pipstar and config_load check when we release rules_python 2.
377-
if rp_config.enable_pipstar and rctx.attr.config_load:
381+
if enable_pipstar:
378382
pypi_repo_utils.execute_checked(
379383
rctx,
380384
op = "whl_library.ExtractWheel({}, {})".format(rctx.attr.name, whl_path),

0 commit comments

Comments
 (0)