wheel: Fails to build wheel for Python 3.10
Encountered while looking into pypa/pip#8312.
$ python --version # Built from master.
Python 3.10.0a0
$ python -c 'import setuptools; print(setuptools.__version__)'
46.0.0
$ python -m pip install --no-build-isolation -U "wheel @ git+https://github.com/pypa/wheel.git"
...
Successfully installed wheel-0.34.2
$ git clone https://github.com/cython/cython.git
$ cd cython
$ python setup.py bdist_wheel
...
running install_scripts
Traceback (most recent call last):
File "cython/setup.py", line 291, in <module>
run_build()
File "cython/setup.py", line 228, in run_build
setup(
File "pip-8312/lib/python3.10/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "python3.10/lib/python3.10/distutils/core.py", line 148, in setup
dist.run_commands()
File "python3.10/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "python3.10/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "pip-8312/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 328, in run
impl_tag, abi_tag, plat_tag = self.get_tag()
File "/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
AssertionError: would build wheel with unsupported tag ('cp310', 'cp310', 'linux_x86_64')
It seems like bdist_wheel is using different tag schemes to build and check the tags. The assertion uses packaging.tags, which correctly tag Python 3.10 as cp3_10 (see pypa/packaging#240), but the build part incorrectly tries to use cp310, causing the assertion error.
Side note: The sdist has a packaging issue. --no-build-isolation is needed since otherwise the build fails with ModuleNotFoundError: No module named 'packaging'.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 14
- Comments: 26 (14 by maintainers)
Commits related to this issue
- python310: fix wheel platform-tag A python 3.10 wheel would produce a wheel with the platform tag as `cp310`, which would be invalid, as only 3_10 is accepted by the wheel package. See: https://gith... — committed to jonringer/nixpkgs by jonringer 4 years ago
- ci: Prepare experimental support for Python 3.10 This does not yet work because of https://github.com/pypa/wheel/issues/354 — committed to Synss/python-mbedtls by Synss 4 years ago
- Updated vendored packaging to v20.8 Fixes #354. — committed to pypa/wheel by agronholm 4 years ago
I’ve released v0.36.2 now.
Working for me now with 3.10 alpha 3
Yey!
Kind ping, since Python-3.10.0a1 is out, and it would be awesome to test our code and oss libraries, but a few can’t be built😭
Probably in a day or two, judging by this comment. But these things take time, there are usually last-minute snags.
https://github.com/pypa/packaging/pull/355 has now been merged, and is included in included in the 20.8 release. I think that should fix this issue. It will just need a new version of wheel with the latest packaging vendored.