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

Revert "Declare license file in packaging tutorial" #1143

Merged
merged 2 commits into from
Sep 25, 2022

Conversation

bhrutledge
Copy link
Contributor

Reverts #1098

While investigating pypa/twine#926, I discovered that using license = { file="LICENSE" } will result in the contents of LICENSE being displayed on PyPI in the "Meta" sidebar section. For example, see:

https://test.pypi.org/project/example-package-bhrutledge/0.0.1/

When I remove that line, I get what I think is the desired behavior, which is the name of the license:

https://test.pypi.org/project/example-package-bhrutledge/0.0.2rc1/

FYI @EpicWink

@EpicWink
Copy link
Contributor

Ah, that seems to be an oversight on the distribution end of Python packaging. Maybe it's worth starting a discussion in Discourse?

If a license file is in the repo, how does the backend know to include it in the package? The Manifest.in tutorial suggests it should be in license_files.

@ofek
Copy link
Sponsor Contributor

ofek commented Sep 19, 2022

After PEP 639 it'll be under licenses/

@bhrutledge
Copy link
Contributor Author

Ah, that seems to be an oversight on the distribution end of Python packaging. Maybe it's worth starting a discussion in Discourse?

I think that's already underway, in the form of PEP 639.

If a license file is in the repo, how does the backend know to include it in the package? The Manifest.in tutorial suggests it should be in license_files.

I think this depends on the backend. As noted in #1098 (comment), all backends except Flit include LICENSE in the sdist and wheel , even when license.file is absent. Also, I'm think MANIFEST.in is only relevant for setuptools.

@EpicWink
Copy link
Contributor

As noted in #1098 (comment), all backends except Flit include LICENSE in the sdist and wheel , even when license.file is absent.

If that's the case, perhaps that could be mentioned in place of including license.file

@bhrutledge bhrutledge merged commit 41eb747 into main Sep 25, 2022
@bhrutledge bhrutledge deleted the revert-1098-patch-1 branch September 25, 2022 00:33
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

Successfully merging this pull request may close these issues.

None yet

3 participants