Wrong platform tag? Or is test.pypi.org confused? Or is my system weird?
I've upgraded my old project to uv, and here's what I get when I uv build it:
- linux architecture is
aarch64⛔ - macos architecture is
arm64✅
Here are the built artefacts from Linux and macOS:
> ls -lt dist/
total 88
-rw-r--r-- 1 dima dima 12446 Dec 3 14:04 awaitwhat-24.11rc1.tar.gz
-rw-r--r-- 1 dima dima 19554 Dec 3 14:04 awaitwhat-24.11rc1-cp39-cp39-linux_aarch64.whl
-rw-r--r-- 1 dima dima 19936 Dec 3 14:04 awaitwhat-24.11rc1-cp38-cp38-linux_aarch64.whl
-rw-r--r-- 1 dima dima 12812 Dec 3 13:54 awaitwhat-24.11rc1-cp38-cp38-macosx_11_0_arm64.whl
-rw-r--r-- 1 dima dima 13987 Dec 3 13:54 awaitwhat-24.11rc1-cp39-cp39-macosx_10_9_universal2.whl
When I try to push these to test.pypi.org, linux_aarch64 wheels are rejected:
> uv publish --publish-url https://test.pypi.org/legacy/ dist/*
warning: `uv publish` is experimental and may change without warning
Publishing 5 files https://test.pypi.org/legacy/
Enter username ('__token__' if using a token): __token__
Enter password:
Uploading awaitwhat-24.11rc1-cp38-cp38-linux_aarch64.whl (19.5KiB)
error: Failed to publish `dist/awaitwhat-24.11rc1-cp38-cp38-linux_aarch64.whl` to https://test.pypi.org/legacy/
Caused by: Upload failed with status code 400 Bad Request. Server says: 400 Binary wheel 'awaitwhat-24.11rc1-cp38-cp38-linux_aarch64.whl' has an unsup Caused by: Upload failed with status code 400 Bad Request. Server says: 400 Binary wheel 'awaitwhat-24.11rc1-cp38-cp38-linux_aarch64.whl' has an unsup
> uvx twine upload --verbose --repository-url https://test.pypi.org/legacy/ dist/*
Uploading distributions to https://test.pypi.org/legacy/
INFO dist/awaitwhat-24.11rc1-cp38-cp38-linux_aarch64.whl (19.5 KB)
INFO dist/awaitwhat-24.11rc1-cp38-cp38-macosx_11_0_arm64.whl (12.5 KB)
INFO dist/awaitwhat-24.11rc1-cp39-cp39-linux_aarch64.whl (19.1 KB)
INFO dist/awaitwhat-24.11rc1-cp39-cp39-macosx_10_9_universal2.whl (13.7 KB)
INFO dist/awaitwhat-24.11rc1.tar.gz (12.1 KB)
INFO username set by command options
INFO Querying keyring for password
Enter your API token:
INFO username: __token__
INFO password: <hidden>
Uploading awaitwhat-24.11rc1-cp38-cp38-linux_aarch64.whl
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 30.8/30.8 kB • 00:00 • 134.0 MB/s
INFO Response from https://test.pypi.org/legacy/:
400 Binary wheel 'awaitwhat-24.11rc1-cp38-cp38-linux_aarch64.whl' has an unsupported platform tag 'linux_aarch64'.
INFO <html>
<head>
<title>400 Binary wheel 'awaitwhat-24.11rc1-cp38-cp38-linux_aarch64.whl' has an unsupported platform tag 'linux_aarch64'.</title>
</head>
<body>
<h1>400 Binary wheel 'awaitwhat-24.11rc1-cp38-cp38-linux_aarch64.whl' has an unsupported platform tag 'linux_aarch64'.</h1>
The server could not comply with the request since it is either malformed or otherwise incorrect.<br/><br/>
Binary wheel 'awaitwhat-24.11rc1-cp38-cp38-linux_aarch64.whl' has an unsupported platform tag 'linux_aarch64'.
</body>
</html>
ERROR HTTPError: 400 Bad Request from https://test.pypi.org/legacy/
Binary wheel 'awaitwhat-24.11rc1-cp38-cp38-linux_aarch64.whl' has an unsupported platform tag 'linux_aarch64'.
P.S. I've installed python using uv; I can only build this library with oldish pythons, <3.10, meanwhile uv only provides >3.7, thus I'm limited to 2 Python versions I can experiment with.
Thanks for the report. cc @konstin
PyPI only accepts manylinux (or musllinux) wheels that are compatible with a wide range of linux systems, but not the plain linux_* tag, you need to run audithwheel on the built wheels. The tag of the wheel is something that's not decided by uv, but the build backend. Most build backends expect the user to run auditwheels themselves before publishing.
FWIW, here's my entire setup
[project]
name = "awaitwhat"
version = "24.11-rc1"
description = "async/await introspection"
authors = [{name="Dima Tisnek", email="[email protected]"}]
license = { file = "LICENSE" }
readme = "readme.md"
keywords = ["asyncio"]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: Implementation :: CPython",
"Framework :: AsyncIO",
"Topic :: Software Development :: Debuggers",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
]
[project.urls]
homepage = "https://github.com/dimaqq/awaitwhat"
repository = "https://github.com/dimaqq/awaitwhat"
documentation = "https://github.com/dimaqq/awaitwhat"
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
packages = ["awaitwhat"]
ext-modules = [
{ name = "awaitwhat._what", sources = ["awaitwhat/what.c"] }
]
I'm very open to suggestions if there's something more modern that I should be using over setuptools.
I figure that would be useful for other who migrate their legacy projects to uv 🦀 🌈 🦄
For C extensions, I recommend running auditwheel over your linux wheels before uploading them.