-
Notifications
You must be signed in to change notification settings - Fork 306
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
add license check to twine check
#926
Comments
TL;DR: I think there's some ambiguity on how to use the According to the project metadata specification:
The definition of
Where
Combined with a vague recollection that PyPI will use classifiers for the "Meta > License" content, I think the preferred approach for MIT would be to add It's worth noting that how a license is specified is likely to change with PEP 639 (currently a draft), which includes an appendix that notes the current inconsistencies. With all of this in mind, I don't think Twine can or should be opinionated here. Furthermore, there have been a lot of proposals to add functionality to |
I think that's very fair, thanks so much for the detailed response. Closing this for sake of tidiness. |
I (and others) have released a few packages recently with the full text of the license file in the
License:
key ofPGK-INFO
.Examples:
This is caused by a mistake in
pyproject.toml -> [project]
: erroneously hadlicense = { file = 'LICENSE' }
, when it should havelicense = { text = 'MIT' }
.Anyway, the point is, it would be great if
twine check
could check this key and raise an error when theLicense
field is too long, or otherwise not a valid value.See pydantic/pydantic#4520 (comment) for some more context.
The text was updated successfully, but these errors were encountered: