Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix missing license file in the Python sdist and bdist/wheel #124

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

musicinmybrain
Copy link
Contributor

This is basically #120, but for Python.

Before this PR, the Python sdist (tarball) and bdist (wheel) lack the necessary LICENSE file.

$ git clean -fxd
$ python3 -m build
$ python3 -m wheel unpack dist/cramjam-2.7.0
$ python3 -m wheel unpack dist/cramjam-2.7.0-cp312-cp312-linux_x86_64.whl 
$ find cramjam-2.7.0/ -name LICENSE
[no output]
$ tar -tzvf dist/cramjam-2.7.0.tar.gz | grep LICENSE
[no output]

After the first commit in this PR:

$ git clean -fxd
$ python3 -m build
$ python3 -m wheel unpack dist/cramjam-2.7.0-cp312-cp312-linux_x86_64.whl
$ find cramjam-2.7.0/ -name LICENSE
[no output]
$ tar -tzvf dist/cramjam-2.7.0.tar.gz | grep LICENSE
-rw-r--r-- 1000/1000      1070 2023-11-13 12:03 cramjam-2.7.0/cramjam-python/LICENSE

After the second commit in this PR:

$ git clean -fxd
$ python3 -m build
$ python3 -m wheel unpack dist/cramjam-2.7.0-cp312-cp312-linux_x86_64.whl
$ find cramjam-2.7.0/ -name LICENSE
cramjam-2.7.0/cramjam-2.7.0.dist-info/license_files/LICENSE
$ tar -tzvf dist/cramjam-2.7.0.tar.gz | grep LICENSE
-rw-r--r-- 1000/1000      1070 2023-11-13 12:03 cramjam-2.7.0/cramjam-python/LICENSE
-rw-r--r-- 1000/1000      1070 2023-11-13 12:03 cramjam-2.7.0/LICENSE

Note that in all cases, the distributed LICENSE is a regular file rather than a dangling symbolic link.

See https://packaging.python.org/en/latest/specifications/pyproject-toml/#license for documentation regarding the second commit.

Copy link
Owner

@milesgranger milesgranger left a comment

Choose a reason for hiding this comment

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

Thank you. 💯

@milesgranger milesgranger merged commit 760cdce into milesgranger:master Jan 8, 2024
65 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants