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

Recommended License configuration leaves license null in project meta data #1690

Open
facelessuser opened this issue Aug 24, 2024 · 6 comments

Comments

@facelessuser
Copy link

So I had an issue opened here: facelessuser/soupsieve#275.

The author of the PR claimed that the license was configured incorrectly in the toml file and references the latest spec: https://packaging.python.org/en/latest/specifications/pyproject-toml/#license.

Hatch, in its current documentation, seems to indicate you can configure it like so:

[project]
...
license = "MIT"

But it seems the specification seems to suggest:

[project]
...
license = { text = "MIT" }

The original complaint was that the project meta data is left with license defined as null if doing it the way Hatch recommends: https://pypi.org/pypi/soupsieve/json.

@ofek
Copy link
Sponsor Collaborator

ofek commented Aug 24, 2024

The API has to begin supporting PEP 639 pypi/warehouse#12585

@facelessuser
Copy link
Author

Just to make sure I understand: hatch does not support this syntax because warehouse does not support this in their API yet either?

@facelessuser
Copy link
Author

Okay, I think I understand a bit better. It seems PEP 639 is a draft, but that is what hatch supports? Warehouse won't support the PEP until it is accepted. What I'm hazy on is whether there is an issue if we use license = { text = "MIT" }? Does this break the display of license in PyPI or does it work fine? Does it fix the null value in the meta data or will it still be broken regardless?

@ofek
Copy link
Sponsor Collaborator

ofek commented Aug 25, 2024

I believe that would fix the issue although maybe the API depends on the license classifier, I can't remember.

@mschoettle
Copy link

Based on my understanding hatch already supports PEP 639 as the first build backend. And that's why the syntax is license = "<SPDX_identifier>". Is that correct?

I wonder if hatch in the meantime could output that license identifier in the metadata under License:?

$ pip show soupsieve
Name: soupsieve
Version: 2.5
Summary: A modern CSS selector implementation for Beautiful Soup.
Home-page: https://github.com/facelessuser/soupsieve
Author: 
Author-email: Isaac Muse <[email protected]>
License: 
Location: <...>
Requires: 
Required-by: beautifulsoup4

@mschoettle
Copy link

Seems like hatch also supports the old/current way of defining it: https://github.com/psf/black/blob/98a580bbdc217a8b1a47b772d2140ed29cdc587a/pyproject.toml#L36 (PyPI API response)

$ pip show black
Name: black
Version: 24.8.0
[...]
License: MIT
[...]

In any case, work on supporting PEP 639 has started: pypi/warehouse#16620

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

No branches or pull requests

3 participants