File tree 1 file changed +13
-1
lines changed 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -569,7 +569,19 @@ def derive_setup_local(
569
569
line += " %s" % link_for_target (lib , target_triple )
570
570
571
571
for entry in info .get ("links-conditional" , []):
572
- if any (re .match (p , target_triple ) for p in entry ["targets" ]):
572
+ if targets := entry .get ("targets" , []):
573
+ target_match = any (re .match (p , target_triple ) for p in targets )
574
+ else :
575
+ target_match = True
576
+
577
+ python_min_match = meets_python_minimum_version (
578
+ python_version , entry .get ("minimum-python-version" , "1.0" )
579
+ )
580
+ python_max_match = meets_python_maximum_version (
581
+ python_version , entry .get ("maximum-python-version" , "100.0" )
582
+ )
583
+
584
+ if target_match and (python_min_match and python_max_match ):
573
585
line += " %s" % link_for_target (entry ["name" ], target_triple )
574
586
575
587
if "-apple-" in target_triple :
You can’t perform that action at this time.
0 commit comments