Hm... PEP 621 deliberately doesn't have a replacement for `setuptools`'s `license`, but they do have a `license` key that is equivalent to `license_files`. Unfortunately, this is what PyPI does with the data in that field:

Not great.

@pganssle Instead of:

license = {file = "LICENSE"}

Try:

license = {text = "Apache-2.0"}

Follow

@hugovk I am not sure if you are supposed to use it that way, and that makes it so you have to choose between including the license file and having a meaningful short description of the license.

I'll probably just fall back to the setuptools config options.

@hugovk Either way it's a huge footgun. The thing everyone is going to think to do causes this problem.

@pganssle Aha, I'm using Hatchling which uses SPDX identifiers:

hatch.pypa.io/latest/config/me

Which points to the draft #PEP639 – "Improving License Clarity with Better Package Metadata":

peps.python.org/pep-0639/

Hopefully it'll be submitted soon. 🤞

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.