Skip to content

Commit dec7455

Browse files
committed
comment: why we are getting sdists[0]
1 parent 24fa6a5 commit dec7455

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/private/bzlmod/pip.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ def _create_whl_repos(module_ctx, pip_attr, whl_map, whl_overrides, group_map, s
276276
distribution = select_whl(
277277
whls = requirement.whls,
278278
want_platform = repository_platform,
279+
# NOTE @aignas 2024-06-01: we use a list for sdists because the parent
280+
# container is a struct, which is immutable and having a list
281+
# allows to store things after the fact. We ever only expect to
282+
# have a single element in the requirements.sdists list.
279283
) or (requirement.sdists[0] if requirement.sdists else None)
280284

281285
logger.debug(lambda: "Selected: {}".format(distribution))

0 commit comments

Comments
 (0)