Skip to content

Revert "Declare license file in packaging tutorial" - #1143

Merged
bhrutledge merged 2 commits into
mainfrom
revert-1098-patch-1
Sep 25, 2022
Merged

Revert "Declare license file in packaging tutorial"#1143
bhrutledge merged 2 commits into
mainfrom
revert-1098-patch-1

Conversation

@bhrutledge

Copy link
Copy Markdown
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

@bhrutledge
bhrutledge requested review from di and dstufft September 18, 2022 11:10
@EpicWink

Copy link
Copy Markdown
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

ofek commented Sep 19, 2022

Copy link
Copy Markdown
Contributor

After PEP 639 it'll be under licenses/

@bhrutledge

Copy link
Copy Markdown
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
Copy Markdown
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.

3 participants