Skip to content

Commit c20d69f

Browse files
committed
refactor: move the group_map construction out of the
_create_whl_libraries func
1 parent 57aa35d commit c20d69f

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

examples/bzlmod/MODULE.bazel.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/private/pypi/extension.bzl

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ def _create_whl_repos(
7070
get_index_urls = None):
7171
exposed_packages = {}
7272
whl_libraries = {}
73-
group_map = {}
7473
whl_map = {}
7574

7675
logger = repo_utils.logger(module_ctx, "pypi:create_whl_repos")
@@ -123,12 +122,6 @@ def _create_whl_repos(
123122
for group_name, group_whls in requirement_cycles.items()
124123
for whl_name in group_whls
125124
}
126-
127-
# TODO @aignas 2024-04-05: how do we support different requirement
128-
# cycles for different abis/oses? For now we will need the users to
129-
# assume the same groups across all versions/platforms until we start
130-
# using an alternative cycle resolution strategy.
131-
group_map[hub_name] = pip_attr.experimental_requirement_cycles
132125
else:
133126
whl_group_mapping = {}
134127
requirement_cycles = {}
@@ -313,7 +306,6 @@ def _create_whl_repos(
313306

314307
return struct(
315308
exposed_packages = exposed_packages,
316-
group_map = group_map,
317309
is_hub_reproducible = is_hub_reproducible,
318310
whl_libraries = whl_libraries,
319311
whl_map = whl_map,
@@ -473,7 +465,12 @@ You cannot use both the additive_build_content and additive_build_content_file a
473465
for hub, config_settings in result.whl_map.items():
474466
for whl, settings in config_settings.items():
475467
hub_whl_map.setdefault(hub, {}).setdefault(whl, []).extend(settings)
476-
hub_group_map.update(result.group_map)
468+
469+
# TODO @aignas 2024-04-05: how do we support different requirement
470+
# cycles for different abis/oses? For now we will need the users to
471+
# assume the same groups across all versions/platforms until we start
472+
# using an alternative cycle resolution strategy.
473+
hub_group_map[pip_attr.hub_name] = pip_attr.experimental_requirement_cycles
477474
exposed_packages.update(result.exposed_packages)
478475
is_reproducible = is_reproducible and result.is_hub_reproducible
479476

0 commit comments

Comments
 (0)