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

Make invalid version info in pyproject.toml less fatal #2417

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

mhils
Copy link
Contributor

@mhils mhils commented Dec 29, 2024

This PR is a simple fix #2416 by making invalid version information in pyproject.toml less fatal.

Thank you for your great work on Maturin! 🍰

@messense
Copy link
Member

According the spec: https://packaging.python.org/en/latest/specifications/pyproject-toml/#dynamic

If the metadata does not list a key in dynamic, then a build back-end CANNOT fill in the requisite metadata on behalf of the user (i.e. dynamic is the only way to allow a tool to fill in metadata and the user must opt into the filling in).

the current behavior is spec compliant, change it to warn only may seem to resolve the error, it can resurface when user try to install a package from sdist (because wheel isn't avaiable for some reason), for eample when using uv: #2390

@messense messense merged commit 0e143c1 into PyO3:main Dec 30, 2024
37 of 38 checks passed
messense added a commit that referenced this pull request Dec 30, 2024
…toml` (#2418)

This PR implements the changes discussed in
#2416 (comment) on
top of #2417. Got this done faster than expected this morning, but won't
have any time to incorporate feedback for the next ~ two days. Feel free
to pull this in and butcher it any way you like. :)

Thanks again for your fantastic work on maturin! 🍰

---------

Co-authored-by: messense <messense@icloud.com>
@mhils mhils deleted the dynamic-version branch December 30, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

project.version field is required
2 participants