@@ -7,7 +7,7 @@ load("//python/private:text_util.bzl", "render")
77load ("//python/private:version.bzl" , "version" )
88load ("//python/private:version_label.bzl" , "version_label" )
99load (":attrs.bzl" , "use_isolated" )
10- load (":evaluate_markers.bzl" , "evaluate_markers_py" , evaluate_markers_star = "evaluate_markers" )
10+ load (":evaluate_markers.bzl" , evaluate_markers_star = "evaluate_markers" )
1111load (":parse_requirements.bzl" , "parse_requirements" )
1212load (":pep508_env.bzl" , "env" )
1313load (":pep508_evaluate.bzl" , "evaluate" )
@@ -194,7 +194,6 @@ def _pip_parse(self, module_ctx, pip_attr):
194194 self ,
195195 module_ctx ,
196196 pip_attr = pip_attr ,
197- enable_pipstar = bool (self ._config .enable_pipstar or self ._get_index_urls .get (pip_attr .python_version )),
198197 enable_pipstar_extract = bool (self ._config .enable_pipstar_extract or self ._get_index_urls .get (pip_attr .python_version )),
199198 )
200199
@@ -297,24 +296,21 @@ def _diff_dict(first, second):
297296 else :
298297 return None
299298
300- def _add_whl_library (self , * , python_version , whl , repo , enable_pipstar ):
299+ def _add_whl_library (self , * , python_version , whl , repo ):
301300 """Add a whl_library and kwargs to call it with for the hub.
302301
303302 Args:
304303 self: implicitly added
305304 python_version: {type}`str` the python version to assume
306305 whl: struct from `_whl_library_args()`
307306 repo: struct from `_whl_repo`
308- enable_pipstar: {type}`bool` if pipstar is enabled.
309307 """
310308 if repo == None :
311309 # NOTE @aignas 2025-07-07: we guard against an edge-case where there
312310 # are more platforms defined than there are wheels for and users
313311 # disallow building from sdist.
314312 return
315313
316- platforms = self ._platforms [python_version ]
317-
318314 # TODO @aignas 2025-06-29: we should not need the version in the repo_name if
319315 # we are using pipstar and we are downloading the wheel using the downloader
320316 #
@@ -339,17 +335,6 @@ def _add_whl_library(self, *, python_version, whl, repo, enable_pipstar):
339335 return
340336 self ._whl_libraries [repo_name ] = repo .args
341337
342- if not enable_pipstar and "experimental_target_platforms" in repo .args :
343- self ._whl_libraries [repo_name ] |= {
344- "experimental_target_platforms" : sorted ({
345- # TODO @aignas 2025-07-07: this should be solved in a better way
346- platforms [candidate ].triple .partition ("_" )[- 1 ]: None
347- for p in repo .args ["experimental_target_platforms" ]
348- for candidate in platforms
349- if candidate .endswith (p )
350- }),
351- }
352-
353338 mapping = self ._whl_map .setdefault (whl .name , {})
354339 if repo .config_setting in mapping and mapping [repo .config_setting ] != repo_name :
355340 fail (
@@ -480,61 +465,27 @@ def _platforms(module_ctx, *, python_version, config, target_platforms):
480465 )
481466 return platforms
482467
483- def _evaluate_markers (self , pip_attr , enable_pipstar ):
468+ def _evaluate_markers (self , pip_attr ):
484469 if self ._evaluate_markers_fn :
485470 return self ._evaluate_markers_fn
486471
487- if enable_pipstar :
488- return lambda _ , requirements : evaluate_markers_star (
489- requirements = requirements ,
490- platforms = self ._platforms [pip_attr .python_version ],
491- )
492-
493- interpreter = _detect_interpreter (self , pip_attr )
494-
495- # NOTE @aignas 2024-08-02: , we will execute any interpreter that we find either
496- # in the PATH or if specified as a label. We will configure the env
497- # markers when evaluating the requirement lines based on the output
498- # from the `requirements_files_by_platform` which should have something
499- # similar to:
500- # {
501- # "//:requirements.txt": ["cp311_linux_x86_64", ...]
502- # }
503- #
504- # We know the target python versions that we need to evaluate the
505- # markers for and thus we don't need to use multiple python interpreter
506- # instances to perform this manipulation. This function should be executed
507- # only once by the underlying code to minimize the overhead needed to
508- # spin up a Python interpreter.
509- return lambda module_ctx , requirements : evaluate_markers_py (
510- module_ctx ,
511- requirements = {
512- k : {
513- p : self ._platforms [pip_attr .python_version ][p ].triple
514- for p in plats
515- }
516- for k , plats in requirements .items ()
517- },
518- python_interpreter = interpreter .path ,
519- python_interpreter_target = interpreter .target ,
520- srcs = pip_attr ._evaluate_markers_srcs ,
521- logger = self ._logger ,
472+ return lambda _ , requirements : evaluate_markers_star (
473+ requirements = requirements ,
474+ platforms = self ._platforms [pip_attr .python_version ],
522475 )
523476
524477def _create_whl_repos (
525478 self ,
526479 module_ctx ,
527480 * ,
528481 pip_attr ,
529- enable_pipstar = False ,
530482 enable_pipstar_extract = False ):
531483 """create all of the whl repositories
532484
533485 Args:
534486 self: the builder.
535487 module_ctx: {type}`module_ctx`.
536488 pip_attr: {type}`struct` - the struct that comes from the tag class iteration.
537- enable_pipstar: {type}`bool` - enable the pipstar or not.
538489 enable_pipstar_extract: {type}`bool` - enable the pipstar extraction or not.
539490 """
540491 logger = self ._logger
@@ -558,7 +509,7 @@ def _create_whl_repos(
558509 platforms = platforms ,
559510 extra_pip_args = pip_attr .extra_pip_args ,
560511 get_index_urls = self ._get_index_urls .get (pip_attr .python_version ),
561- evaluate_markers = _evaluate_markers (self , pip_attr , enable_pipstar ),
512+ evaluate_markers = _evaluate_markers (self , pip_attr ),
562513 logger = logger ,
563514 )
564515
@@ -577,7 +528,6 @@ def _create_whl_repos(
577528 self ,
578529 module_ctx ,
579530 pip_attr = pip_attr ,
580- enable_pipstar = enable_pipstar ,
581531 )
582532
583533 interpreter = _detect_interpreter (self , pip_attr )
@@ -600,18 +550,16 @@ def _create_whl_repos(
600550 python_version = _major_minor_version (pip_attr .python_version ),
601551 is_multiple_versions = whl .is_multiple_versions ,
602552 interpreter = interpreter ,
603- enable_pipstar = enable_pipstar ,
604553 enable_pipstar_extract = enable_pipstar_extract ,
605554 )
606555 _add_whl_library (
607556 self ,
608557 python_version = pip_attr .python_version ,
609558 whl = whl ,
610559 repo = repo ,
611- enable_pipstar = enable_pipstar ,
612560 )
613561
614- def _common_args (self , module_ctx , * , pip_attr , enable_pipstar ):
562+ def _common_args (self , module_ctx , * , pip_attr ):
615563 # Construct args separately so that the lock file can be smaller and does not include unused
616564 # attrs.
617565 whl_library_args = dict (
@@ -627,8 +575,6 @@ def _common_args(self, module_ctx, *, pip_attr, enable_pipstar):
627575 envsubst = pip_attr .envsubst ,
628576 pip_data_exclude = pip_attr .pip_data_exclude ,
629577 )
630- if not enable_pipstar :
631- maybe_args ["experimental_target_platforms" ] = pip_attr .experimental_target_platforms
632578
633579 whl_library_args .update ({k : v for k , v in maybe_args .items () if v })
634580 maybe_args_with_default = dict (
@@ -679,7 +625,6 @@ def _whl_repo(
679625 python_version ,
680626 use_downloader ,
681627 interpreter ,
682- enable_pipstar = False ,
683628 enable_pipstar_extract = False ):
684629 args = dict (whl_library_args )
685630 args ["requirement" ] = src .requirement_line
@@ -731,14 +676,6 @@ def _whl_repo(
731676 args ["urls" ] = [src .url ]
732677 args ["sha256" ] = src .sha256
733678 args ["filename" ] = src .filename
734- if not enable_pipstar :
735- args ["experimental_target_platforms" ] = [
736- # Get rid of the version for the target platforms because we are
737- # passing the interpreter any way. Ideally we should search of ways
738- # how to pass the target platforms through the hub repo.
739- p .partition ("_" )[2 ]
740- for p in src .target_platforms
741- ]
742679
743680 # TODO @aignas 2025-11-02: once we have pipstar enabled we can add extra
744681 # targets to each hub for each extra combination and solve this more cleanly as opposed to
0 commit comments