Skip to content

Conversation

FollowTheProcess
Copy link
Collaborator

I've discovered (by accident) something quite unfortunate about the PEP 621 pyproject.toml license field. I recently ported pytoil to support PEP 621 and released a new version with the following config:

license = {file = "LICENSE"}

However this gives a rather ugly representation of the entire file on PyPI:

image

This can be fixed by simply passing the name of the license in the text key like so:

license = {text = "Apache-2.0"}

Which results in what you'd expect:

image

And I can confirm that the full LICENSE file is still included when running pyproject-build:

image

Copy link
Collaborator

@DiddiLeija DiddiLeija left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@FollowTheProcess FollowTheProcess merged commit f12fb34 into main May 7, 2022
@FollowTheProcess FollowTheProcess deleted the fix/pep621-license-field branch May 7, 2022 07:50
airtower-luna added a commit to crystal-cat/exif_rename that referenced this pull request Aug 17, 2022
I noticed wntrblm/nox#619 and it turns out the
issue affects "pip show" as well: If the license field is set to a
file, the whole content of the file is quoted in the pip output, which
is unwieldy. Specify a short identifier instead, the COPYING file is
still available.
airtower-luna added a commit to crystal-cat/exif_rename that referenced this pull request Aug 17, 2022
I noticed wntrblm/nox#619 and it turns out the
issue affects "pip show" as well: If the license field is set to a
file, the whole content of the file is quoted in the pip output, which
is unwieldy. Specify a short identifier instead, the COPYING file is
still available.
crystal-cat pushed a commit to crystal-cat/exif_rename that referenced this pull request Aug 18, 2022
I noticed wntrblm/nox#619 and it turns out the
issue affects "pip show" as well: If the license field is set to a
file, the whole content of the file is quoted in the pip output, which
is unwieldy. Specify a short identifier instead, the COPYING file is
still available.
crystal-cat pushed a commit to crystal-cat/exif_rename that referenced this pull request Apr 24, 2023
I noticed wntrblm/nox#619 and it turns out the
issue affects "pip show" as well: If the license field is set to a
file, the whole content of the file is quoted in the pip output, which
is unwieldy. Specify a short identifier instead, the COPYING file is
still available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants