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

Support PEP 639 license metadata once that PEP is accepted #93

Open
edmorley opened this issue Dec 20, 2022 · 7 comments
Open

Support PEP 639 license metadata once that PEP is accepted #93

edmorley opened this issue Dec 20, 2022 · 7 comments

Comments

@edmorley
Copy link

edmorley commented Dec 20, 2022

This project has a license defined under the [project] table in pyproject.toml:
https://github.com/heroku/sf-functions-python/blob/a7541831525ae1850ae2c8511d2b0c8f94597a53/pyproject.toml#L10

However, pyroma 4.1 on macOS using Python 3.11.0 reports that no license was specified:

$ pyroma .
------------------------------
Checking .
Getting metadata for wheel...
Found salesforce-functions
------------------------------
...
Your package does neither have a license field nor any license classifiers.
@edmorley
Copy link
Author

Hmm so this might be fixed by:
pypa/hatch#576

@CAM-Gerlach
Copy link
Collaborator

Pyroma is referring to the License core metadata field (which is mapped to license.text key in the [project] table, and license in most other tool-specific configs, e.g. setup.cfg). If you set a string value directly for the license key in Hatch, which implements my latest draft of PEP 639, that is used to set the License-Expression core metadata field. I do include an optional provision allowing, but not requiring tools to also backfill the License field with the same value, but I assume Hatch does not choose to do that. Therefore, Pyroma will not directly detect it.

PEP 639 is a draft spec, and I need to finish at least one last round of (mostly non-content-relevant changes) and potentially some additional feedback, before it is considered for acceptance and final implementation, so it seems premature for Pyroma to support it yet. Sorry for the delay! However, when it does, Pyroma should detect (and perhaps validate) it.

@edmorley
Copy link
Author

Thank you for the fast reply! I'd missed that PEP 639 is still a draft - Hatch's docs suggest using the new string form project.license field, so I had presumed it was finalised.

I've filed pypa/hatch#679

@CAM-Gerlach
Copy link
Collaborator

Thanks, I've replied over there. We could leave this open as a reminder if/when PEP 639 is accepted, or we could close this for now.

@edmorley
Copy link
Author

We could leave this open as a reminder if/when PEP 639 is accepted, or we could close this for now.

Whichever you prefer; either works for me :-)

@CAM-Gerlach
Copy link
Collaborator

Up to @regebro

@regebro
Copy link
Owner

regebro commented Dec 21, 2022

Let's leave it open.

@CAM-Gerlach CAM-Gerlach changed the title pyroma does not detect license defined in pyproject.toml Support PEP 639 license metadata once that PEP is accepted Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants