Skip to content

Commit c5ff77a

Browse files
committed
simplify
1 parent 62df3ac commit c5ff77a

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

python/private/pypi/extension.bzl

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -166,21 +166,10 @@ def _create_whl_repos(
166166
),
167167
extra_pip_args = pip_attr.extra_pip_args,
168168
get_index_urls = get_index_urls,
169-
# NOTE @aignas 2024-08-02: , we will execute any interpreter that we find either
170-
# in the PATH or if specified as a label. We will configure the env
171-
# markers when evaluating the requirement lines based on the output
172-
# from the `requirements_files_by_platform` which should have something
173-
# similar to:
174-
# {
175-
# "//:requirements.txt": ["cp311_linux_x86_64", ...]
176-
# }
177-
#
178-
# We know the target python versions that we need to evaluate the
179-
# markers for and thus we don't need to use multiple python interpreter
180-
# instances to perform this manipulation. This function should be executed
181-
# only once by the underlying code to minimize the overhead needed to
182-
# spin up a Python interpreter.
183-
evaluate_markers = lambda r: evaluate_markers(r),
169+
# NOTE @aignas 2025-02-24: we will use the "cp3xx_os_arch" platform labels
170+
# for converting to the PEP508 environment and will evaluate them in starlark
171+
# without involving the interpreter at all.
172+
evaluate_markers = evaluate_markers,
184173
logger = logger,
185174
)
186175

python/private/pypi/pip_repository.bzl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ def _pip_repository_impl(rctx):
8282
extra_pip_args = rctx.attr.extra_pip_args,
8383
),
8484
extra_pip_args = rctx.attr.extra_pip_args,
85-
evaluate_markers = lambda requirements: evaluate_markers(
86-
requirements = requirements,
87-
),
85+
evaluate_markers = evaluate_markers,
8886
)
8987
selected_requirements = {}
9088
options = None

0 commit comments

Comments
 (0)