Skip to content

Commit e13ecb8

Browse files
committed
improve the logic in whl_library
1 parent 88189be commit e13ecb8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

python/private/pypi/whl_library.bzl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,9 @@ def _whl_library_impl(rctx):
324324

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

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:
327+
# also enable pipstar for any whls that are downloaded without `pip`
328+
enable_pipstar = (rp_config.enable_pipstar or whl_path) and rctx.attr.config_load
329+
if not whl_path:
332330
if rctx.attr.urls:
333331
op_tmpl = "whl_library.BuildWheelFromSource({name}, {requirement})"
334332
elif rctx.attr.download_only:

0 commit comments

Comments
 (0)