Skip to content

Commit aca42c3

Browse files
committed
feat(pipstar): extract the wheel without python
With this we start extracting the wheel without Python and it becomes a requirement only when patching (we will extract the wheel without Python, patch it and then re-compress it which makes a very inefficient process). This should result in much faster executions.
1 parent 6461690 commit aca42c3

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

python/private/pypi/whl_library.bzl

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -375,20 +375,9 @@ def _whl_library_impl(rctx):
375375
#
376376
# Remove non-pipstar and config_load check when we release rules_python 2.
377377
if rp_config.enable_pipstar and rctx.attr.config_load:
378-
pypi_repo_utils.execute_checked(
379-
rctx,
380-
op = "whl_library.ExtractWheel({}, {})".format(rctx.attr.name, whl_path),
381-
python = python_interpreter,
382-
arguments = args + [
383-
"--whl-file",
384-
whl_path,
385-
"--enable-pipstar",
386-
],
387-
srcs = rctx.attr._python_srcs,
388-
environment = environment,
389-
quiet = rctx.attr.quiet,
390-
timeout = rctx.attr.timeout,
391-
logger = logger,
378+
rctx.extract(
379+
archive = whl_path,
380+
output = "site-packages",
392381
)
393382

394383
metadata = whl_metadata(

0 commit comments

Comments
 (0)