astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.82k stars 467 forks source link

🐛 Binary wheel has an unsupported platform tag 'linux_x86_64'. #1181

Open galenseilis opened 4 months ago

galenseilis commented 4 months ago

Steps to Reproduce

$ rye init . --license AGPL-3.0-or-later --build-system maturin
$ rye build
$ rye publish

Expected Result

I expect a message saying that publishing to PyPI was successful.

Actual Result

Uploading distributions to https://upload.pypi.org/legacy/
Uploading pyruciw-0.1.0-cp312-cp312-linux_x86_64.whl
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 MB • 00:02 • 1.2 MB/s
WARNING  Error during upload. Retry with the --verbose option for more details.                                     
ERROR    HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/                                            
         Binary wheel 'pyruciw-0.1.0-cp312-cp312-linux_x86_64.whl' has an unsupported platform tag 'linux_x86_64'.  
error: failed to publish files

Version Info

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy

$ rye --version
rye 0.35.0
commit: 0.35.0 (a1dbc56d4 2024-06-24)
platform: linux (x86_64)
self-python: cpython@3.12.3
symlink support: true
uv enabled: true

Stacktrace

$ RUST_BACKTRACE=1
$ rye publish
Uploading distributions to https://upload.pypi.org/legacy/
Uploading pyruciw-0.1.0-cp312-cp312-linux_x86_64.whl
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 MB • 00:02 • 1.4 MB/s
WARNING  Error during upload. Retry with the --verbose option for more details.                                     
ERROR    HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/                                            
         Binary wheel 'pyruciw-0.1.0-cp312-cp312-linux_x86_64.whl' has an unsupported platform tag 'linux_x86_64'.  
error: failed to publish files
galenseilis commented 4 months ago

Not sure if PEP513 is relevant here, but it seems like I need an alternative linux build.

galenseilis commented 4 months ago

This seems like a weird fix... but changing the file name to pyruciw-0.1.0-cp312-cp312-manylinux1_x86_64.whl allowed rye publish to work... I'll leave this open as I feel this should be taken care of by Rye itself (or its underlying tooling).

charliermarsh commented 4 months ago

I think you need to run that wheel through auditwheel?

charliermarsh commented 4 months ago

Although I thought maturin did this for you.

charliermarsh commented 4 months ago

Maybe @konstin knows.