@@ -5,7 +5,7 @@ load("//python/private:normalize_name.bzl", "normalize_name")
5
5
load ("//python/private:version.bzl" , "version" )
6
6
load ("//python/private:version_label.bzl" , "version_label" )
7
7
load (":attrs.bzl" , "use_isolated" )
8
- load (":evaluate_markers.bzl" , "evaluate_markers_py" , evaluate_markers_star = " evaluate_markers" )
8
+ load (":evaluate_markers.bzl" , "evaluate_markers" )
9
9
load (":parse_requirements.bzl" , "parse_requirements" )
10
10
load (":pep508_env.bzl" , "env" )
11
11
load (":pep508_evaluate.bzl" , "evaluate" )
@@ -175,8 +175,6 @@ def _add_whl_library(self, *, python_version, whl, repo):
175
175
# disallow building from sdist.
176
176
return
177
177
178
- platforms = self ._platforms [python_version ]
179
-
180
178
# TODO @aignas 2025-06-29: we should not need the version in the repo_name if
181
179
# we are using pipstar and we are downloading the wheel using the downloader
182
180
repo_name = "{}_{}_{}" .format (self .name , version_label (python_version ), repo .repo_name )
@@ -188,17 +186,6 @@ def _add_whl_library(self, *, python_version, whl, repo):
188
186
))
189
187
self ._whl_libraries [repo_name ] = repo .args
190
188
191
- if not self ._config .enable_pipstar and "experimental_target_platforms" in repo .args :
192
- self ._whl_libraries [repo_name ] |= {
193
- "experimental_target_platforms" : sorted ({
194
- # TODO @aignas 2025-07-07: this should be solved in a better way
195
- platforms [candidate ].triple .partition ("_" )[- 1 ]: None
196
- for p in repo .args ["experimental_target_platforms" ]
197
- for candidate in platforms
198
- if candidate .endswith (p )
199
- }),
200
- }
201
-
202
189
mapping = self ._whl_map .setdefault (whl .name , {})
203
190
if repo .config_setting in mapping and mapping [repo .config_setting ] != repo_name :
204
191
fail (
@@ -329,41 +316,9 @@ def _evaluate_markers(self, pip_attr):
329
316
if self ._evaluate_markers_fn :
330
317
return self ._evaluate_markers_fn
331
318
332
- if self ._config .enable_pipstar :
333
- return lambda _ , requirements : evaluate_markers_star (
334
- requirements = requirements ,
335
- platforms = self ._platforms [pip_attr .python_version ],
336
- )
337
-
338
- interpreter = _detect_interpreter (self , pip_attr )
339
-
340
- # NOTE @aignas 2024-08-02: , we will execute any interpreter that we find either
341
- # in the PATH or if specified as a label. We will configure the env
342
- # markers when evaluating the requirement lines based on the output
343
- # from the `requirements_files_by_platform` which should have something
344
- # similar to:
345
- # {
346
- # "//:requirements.txt": ["cp311_linux_x86_64", ...]
347
- # }
348
- #
349
- # We know the target python versions that we need to evaluate the
350
- # markers for and thus we don't need to use multiple python interpreter
351
- # instances to perform this manipulation. This function should be executed
352
- # only once by the underlying code to minimize the overhead needed to
353
- # spin up a Python interpreter.
354
- return lambda module_ctx , requirements : evaluate_markers_py (
355
- module_ctx ,
356
- requirements = {
357
- k : {
358
- p : self ._platforms [pip_attr .python_version ][p ].triple
359
- for p in plats
360
- }
361
- for k , plats in requirements .items ()
362
- },
363
- python_interpreter = interpreter .path ,
364
- python_interpreter_target = interpreter .target ,
365
- srcs = pip_attr ._evaluate_markers_srcs ,
366
- logger = self ._logger ,
319
+ return lambda _ , requirements : evaluate_markers (
320
+ requirements = requirements ,
321
+ platforms = self ._platforms [pip_attr .python_version ],
367
322
)
368
323
369
324
def _create_whl_repos (
@@ -435,7 +390,6 @@ def _create_whl_repos(
435
390
auth_patterns = self ._config .auth_patterns or pip_attr .auth_patterns ,
436
391
python_version = _major_minor_version (pip_attr .python_version ),
437
392
is_multiple_versions = whl .is_multiple_versions ,
438
- enable_pipstar = self ._config .enable_pipstar ,
439
393
)
440
394
_add_whl_library (
441
395
self ,
@@ -463,8 +417,6 @@ def _common_args(self, module_ctx, *, pip_attr):
463
417
python_interpreter = interpreter .path ,
464
418
python_interpreter_target = interpreter .target ,
465
419
)
466
- if not self ._config .enable_pipstar :
467
- maybe_args ["experimental_target_platforms" ] = pip_attr .experimental_target_platforms
468
420
469
421
whl_library_args .update ({k : v for k , v in maybe_args .items () if v })
470
422
maybe_args_with_default = dict (
@@ -512,8 +464,7 @@ def _whl_repo(
512
464
netrc ,
513
465
auth_patterns ,
514
466
python_version ,
515
- use_downloader ,
516
- enable_pipstar = False ):
467
+ use_downloader ):
517
468
args = dict (whl_library_args )
518
469
args ["requirement" ] = src .requirement_line
519
470
is_whl = src .filename .endswith (".whl" )
@@ -556,14 +507,6 @@ def _whl_repo(
556
507
args ["urls" ] = [src .url ]
557
508
args ["sha256" ] = src .sha256
558
509
args ["filename" ] = src .filename
559
- if not enable_pipstar :
560
- args ["experimental_target_platforms" ] = [
561
- # Get rid of the version for the target platforms because we are
562
- # passing the interpreter any way. Ideally we should search of ways
563
- # how to pass the target platforms through the hub repo.
564
- p .partition ("_" )[2 ]
565
- for p in src .target_platforms
566
- ]
567
510
568
511
return struct (
569
512
repo_name = whl_repo_name (src .filename , src .sha256 ),
0 commit comments