Skip to content

Include license file in sdist #123

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

Merged
merged 1 commit into from
Mar 27, 2023
Merged

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Mar 27, 2023

Fixes #122.

With flit-core, looks like we need to explicitly include the licence file:

license

A table with either a file key (a relative path to a license file) or a text key (the license text).

https://flit.pypa.io/en/stable/pyproject_toml.html

With setuptools, the 2022.1 sdist includes:

-rw-r--r--   1 hugo  staff   2.4K Mar 22 15:34 LICENSE
-rw-r--r--   1 hugo  staff    67B Mar 27 17:44 MANIFEST.in
-rw-r--r--   1 hugo  staff   1.4K Mar 27 17:44 PKG-INFO
-rw-r--r--   1 hugo  staff   858B Mar 22 15:34 README.rst
-rw-r--r--   1 hugo  staff   105B Mar 27 17:44 pyproject.toml
drwxr-xr-x   7 hugo  staff   224B Mar 27 17:44 python_docs_theme
drwxr-xr-x   7 hugo  staff   224B Mar 27 17:44 python_docs_theme.egg-info
-rw-r--r--   1 hugo  staff    67B Mar 27 17:44 setup.cfg
-rw-r--r--   1 hugo  staff   1.2K Mar 27 17:44 setup.py

With flit, the v2023.3.1 sdist includes:

-rw-r--r--  1 hugo  staff   2.0K Jan  1  1970 PKG-INFO
-rw-r--r--  1 hugo  staff   858B Mar 22 15:34 README.rst
-rw-r--r--  1 hugo  staff   1.4K Mar 27 17:44 pyproject.toml
drwxr-xr-x  7 hugo  staff   224B Mar 27 17:47 python_docs_theme

With this PR, the sdist includes:

-rw-r--r--  1 hugo  staff   2.4K Mar 22 15:34 LICENSE
-rw-r--r--  1 hugo  staff   2.0K Jan  1  1970 PKG-INFO
-rw-r--r--  1 hugo  staff   858B Mar 22 15:34 README.rst
-rw-r--r--  1 hugo  staff   1.4K Mar 27 17:47 pyproject.toml
drwxr-xr-x  7 hugo  staff   224B Mar 27 17:48 python_docs_theme

@Mariatta Mariatta merged commit 4609599 into python:main Mar 27, 2023
@hugovk hugovk deleted the flit-fix-licence branch March 27, 2023 18:06
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.

Please include the license file in the sdist (PyPI)
3 participants