-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: adding PEP 639 support #132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @henryiii for working on this. I haven't read the final version of the PEP, thus I cannot comment on whether this implements it correctly, however, I gave a quick look and I have a few comments on the implementation.
The most important one is that I think the validation of the license-related fields happens at the wrong time. The other are just minor things, mostly improvements to the exception messages.
I scrolled through PEP639 and I've noticed a couple more things: this PR does not implement support for custom licenses (the |
This PR doesn't do any validation of the license string at all, so |
I think I misread the PEP. I thought that custom licenses went in a different RFC822 field. It does not seem the case. |
Sorry, continuing my quest for better error messages... |
a269c67
to
3a76850
Compare
Thanks @henryiii Everything looks good to me. I can have a try at integrating this into meson-python and see how it goes (we need to make sure that the license files are included in the wheel, otherwise I don't see anything else that needs to be done in the build backend) and report back. Or you can merge it and we can fix any shortcoming later. I'll probably will not have much time to work on this in the next couple of days... |
There will be one more set of warnings or errors (if Will ping both you and Frost when it's ready. |
ce2ca62
to
362208e
Compare
@frostming and @dnicolodi, this is ready for review (@dnicolodi, the only thing changed since you've looked last is more tests and some new License related warnings and an error. And I followed your suggestion of putting the warning in validate, added a param to turn the warnings off so they only show up once). |
7c258dc
to
585e567
Compare
Signed-off-by: Henry Schreiner <[email protected]> Co-authored-by: Daniele Nicolodi <[email protected]> fix: also error if classfiers are also given Signed-off-by: Henry Schreiner <[email protected]> tests: add more tests Signed-off-by: Henry Schreiner <[email protected]> fix: one more warning Signed-off-by: Henry Schreiner <[email protected]> fix: address review comments Signed-off-by: Henry Schreiner <[email protected]> fix: include string in the error message for project.license Signed-off-by: Henry Schreiner <[email protected]>
585e567
to
4a9f1ee
Compare
I've released 0.9.0b1 so backend authors can try these changes out before we release them fully. @dnicolodi for meson-python |
This adds PEP 639 support. Details for backends mentioned in readme.
I left normalization and validation to packaging (pypa/packaging#828), otherwise we'd want to basically vendor that code and keep a license list up to date.
Close #130.