Skip to content

Commit db93f18

Browse files
pipcl.py: fix wheel name with Py_GIL_DISABLED, e.g. with python-3.14t.
We need to set abi tag to cp314t or similar. Also fail if py_limited_api and Py_GIL_DISABLED are both set - this is not supported by current python.
1 parent 6c522f1 commit db93f18

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

pipcl.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,10 +914,19 @@ def tag_abi(self):
914914
'''
915915
ABI tag.
916916
'''
917+
Py_GIL_DISABLED = sysconfig.get_config_var('Py_GIL_DISABLED')
917918
if self.tag_abi_:
918919
return self.tag_abi_
919920
elif self.py_limited_api:
921+
assert Py_GIL_DISABLED != 1, \
922+
f'py_limited_api and Py_GIL_DISABLED are not supported together as of 2026-02-20, e.g. see PEP 803 and PEP 809.'
920923
return 'abi3'
924+
elif Py_GIL_DISABLED == 1:
925+
ret = ''
926+
ret += 'cp'
927+
ret += ''.join(platform.python_version().split('.')[:2])
928+
ret += 't'
929+
return ret
921930
else:
922931
return 'none'
923932

0 commit comments

Comments
 (0)