-
Notifications
You must be signed in to change notification settings - Fork 170
Description
Hello, I'm one of the maintainers of pygame-ce. I downloaded the recent release of Python 3.13a1 to test if pygame-ce would build against it, and after I commented out all the cython modules (which all failed to build ofc), I got this error:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\charl\Desktop\pygame-ce\setup.py", line 1051, in <module>
setup(**PACKAGEDATA)
File "C:\Users\charl\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\charl\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\charl\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\charl\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\dist.py", line 989, in run_command
super().run_command(command)
File "C:\Users\charl\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\charl\AppData\Local\Programs\Python\Python313\Lib\site-packages\wheel\bdist_wheel.py", line 401, in run
impl_tag, abi_tag, plat_tag = self.get_tag()
^^^^^^^^^^^^^^
File "C:\Users\charl\AppData\Local\Programs\Python\Python313\Lib\site-packages\wheel\bdist_wheel.py", line 351, in get_tag
tag in supported_tags
AssertionError: would build wheel with unsupported tag ('cp313', 'cpwin_amd64', 'win_amd64')I added a print for the supported tags and I got this:
[('cp313', 'cp313', 'win_amd64'), ('cp313', 'abi3', 'win_amd64'), ('cp313', 'none', 'win_amd64'), ('cp312', 'abi3', 'win_amd64'), ('cp311', 'abi3', 'win_amd64'), ('cp310', 'abi3', 'win_amd64'), ('cp39', 'abi3', 'win_amd64'), ('cp38', 'abi3', 'win_amd64'), ('cp37', 'abi3', 'win_amd64'), ('cp36', 'abi3', 'win_amd64'), ('cp35', 'abi3', 'win_amd64'), ('cp34', 'abi3', 'win_amd64'), ('cp33', 'abi3', 'win_amd64'), ('cp32', 'abi3', 'win_amd64'), ('py313', 'none', 'win_amd64'), ('py3', 'none', 'win_amd64'), ('py312', 'none', 'win_amd64'), ('py311', 'none', 'win_amd64'), ('py310', 'none', 'win_amd64'), ('py39', 'none', 'win_amd64'), ('py38', 'none', 'win_amd64'), ('py37', 'none', 'win_amd64'), ('py36', 'none', 'win_amd64'), ('py35', 'none', 'win_amd64'), ('py34', 'none', 'win_amd64'), ('py33', 'none', 'win_amd64'), ('py32', 'none', 'win_amd64'), ('py31', 'none', 'win_amd64'), ('py30', 'none', 'win_amd64'), ('cp313', 'none', 'win_amd64'), ('py313', 'none', 'win_amd64'), ('py3', 'none', 'win_amd64'), ('py312', 'none', 'win_amd64'), ('py311', 'none', 'win_amd64'), ('py310', 'none', 'win_amd64'), ('py39', 'none', 'win_amd64'), ('py38', 'none', 'win_amd64'), ('py37', 'none', 'win_amd64'), ('py36', 'none', 'win_amd64'), ('py35', 'none', 'in_amd64')]
Since pygame-ce is a C-extension and is not using the limited ABI, the correct abi_tag is "cp313." I tried going into bdist_wheel.py and hardcoding that and the build worked completely.
Why has this changed?
I looked at the logic to get the wheel tag and noticed that on Python 3.12, sysconfig.get_config_var("SOABI") returns None, but on Python 3.13a1 sysconfig.get_config_var("SOABI") returns 'cp313-win_amd64'. This causes an invalid abi_tag to be generated and the build won't complete.
The only other mention I was able to find of this on the internet was this Chinese forum post with someone unable to install PyQt5 with the same error message- https://ask.csdn.net/questions/8011982
I'm unsure if this would be considered a bug in CPython for the behavior change or a bug in wheel for not accommodating it. I'm putting it here for now.