@@ -429,29 +429,30 @@ def _whl_repo(
429
429
def _configure (config , * , platform , os_name , arch_name , config_settings , env = {}, whl_abi_tags , whl_platform_tags , override = False ):
430
430
"""Set the value in the config if the value is provided"""
431
431
config .setdefault ("platforms" , {})
432
- if platform and (os_name or arch_name or config_settings or whl_platform_tags or env ):
433
- if not override and config . get ( "platforms" , {}) .get (platform ):
432
+ if platform and (os_name or arch_name or config_settings or whl_abi_tags or whl_platform_tags or env ):
433
+ if not override and config [ "platforms" ] .get (platform ):
434
434
return
435
435
436
436
for key in env :
437
437
if key not in _SUPPORTED_PEP508_KEYS :
438
438
fail ("Unsupported key in the PEP508 environment: {}" .format (key ))
439
439
440
+ # NOTE @aignas 2025-07-08: the least preferred is the first item in the list
440
441
if whl_platform_tags and "any" not in whl_platform_tags :
441
442
# the lowest priority one needs to be the first one
442
443
whl_platform_tags = ["any" ] + whl_platform_tags
443
444
445
+ whl_abi_tags = whl_abi_tags or ["abi3" , "cp{major}{minor}" ]
446
+ if whl_abi_tags and "none" not in whl_abi_tags :
447
+ # the lowest priority one needs to be the first one
448
+ whl_abi_tags = ["none" ] + whl_abi_tags
449
+
444
450
config ["platforms" ][platform ] = struct (
445
451
name = platform .replace ("-" , "_" ).lower (),
446
452
os_name = os_name ,
447
453
arch_name = arch_name ,
448
454
config_settings = config_settings ,
449
- whl_abi_tags = whl_abi_tags or [
450
- # NOTE @aignas 2025-07-08: the least preferred is the first item in the list
451
- "none" ,
452
- "abi3" ,
453
- "cp{major}{minor}" ,
454
- ],
455
+ whl_abi_tags = whl_abi_tags ,
455
456
whl_platform_tags = whl_platform_tags ,
456
457
env = {
457
458
# default to this
0 commit comments