Skip to content

Commit 872d0c4

Browse files
committed
create a pip_parse method in the builder
1 parent 5b39b2e commit 872d0c4

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

python/private/pypi/extension.bzl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,7 @@ You cannot use both the additive_build_content and additive_build_content_file a
285285
else:
286286
builder = pip_hub_map[pip_attr.hub_name]
287287

288-
builder.add(pip_attr = pip_attr)
289-
290-
# TODO @aignas 2025-05-19: express pip.parse as a series of configure calls
291-
builder.create_whl_repos(
288+
builder.pip_parse(
292289
module_ctx,
293290
pip_attr = pip_attr,
294291
whl_overrides = whl_overrides,

python/private/pypi/hub_builder.bzl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def hub_builder(
7979
evaluate_markers = lambda *a, **k: _evaluate_markers(self, *a, **k),
8080
build = lambda: _build(self),
8181
create_whl_repos = lambda *a, **k: _create_whl_repos(self, *a, **k),
82+
pip_parse = lambda *a, **k: _pip_parse(self, *a, **k),
8283
)
8384

8485
# buildifier: enable=uninitialized
@@ -533,3 +534,12 @@ def _whl_repo(
533534
target_platforms = src.target_platforms,
534535
),
535536
)
537+
538+
def _pip_parse(self, module_ctx, pip_attr, whl_overrides):
539+
self.add(pip_attr = pip_attr)
540+
541+
self.create_whl_repos(
542+
module_ctx,
543+
pip_attr = pip_attr,
544+
whl_overrides = whl_overrides,
545+
)

0 commit comments

Comments
 (0)