Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metadata version missmatch in uv 0.5.5 #9513

Open
franzhaas opened this issue Nov 28, 2024 · 7 comments
Open

metadata version missmatch in uv 0.5.5 #9513

franzhaas opened this issue Nov 28, 2024 · 7 comments
Labels
upstream An upstream dependency is involved

Comments

@franzhaas
Copy link

franzhaas commented Nov 28, 2024

Dear all,

I got this error when building and uploading my wheel with 0.5.5 to pypi.org.:

Upload failed with status code 400 Bad Request. Server says: 400 license-file introduced in metadata version 2.4, not 2.1. See https://packaging.python.org/specifications/core-metadata for more information.

But it does work for me with 0.5.4.

Accoridng to the release notes, with 0.5.5 uv started to use license-file, however I did not see a mention of moving the metadata version...

Any ideas?

Thanks in advance,
Franz

@konstin
Copy link
Member

konstin commented Nov 28, 2024

This is probably #9442: It's correct that you can only use license-file with metadata of at least version 2.4, but we were missing that field in the upload payload previously so pypi's validation didn't work. What build backend are you using?

@franzhaas
Copy link
Author

franzhaas commented Nov 28, 2024

Hi Konstin,

I use.:

[build-system]
requires = ["setuptools", "wheel", "setuptools-scm"]
build-backend = "setuptools.build_meta"

If it helps, the full project is located here.: https://github.com/MarketSquare/robotframework-construct

@FHU-yezi
Copy link

I got the same error with uv build used in building my project.

Here is the repo: https://github.com/FHU-yezi/sshared

The failed publish GitHub Action flow: https://github.com/FHU-yezi/sshared/actions/runs/12078435589/job/33682841905

It is a pure Python package and I got this error after updated to the latest uv version.

@konstin
Copy link
Member

konstin commented Nov 29, 2024

This is a bug in setuptools: pypa/setuptools#4759

uv unfortunately can't do anything about this.

@konstin konstin added the upstream An upstream dependency is involved label Nov 29, 2024
@franzhaas
Copy link
Author

franzhaas commented Nov 29, 2024 via email

@my1e5
Copy link
Contributor

my1e5 commented Nov 29, 2024

@franzhaas versioningit works with setuptools and also hatchling.

@franzhaas
Copy link
Author

I did not try to upload, but when building with hatchling, I ended up using metadata 2.3... for both uv 0.5.4 and 0.5.5...

this might be related to this one.:
pypa/hatch#1819

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream An upstream dependency is involved
Projects
None yet
Development

No branches or pull requests

4 participants