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

Remove deprecated license_file from setup.cfg #135

Merged
merged 1 commit into from
Jun 2, 2020
Merged

Remove deprecated license_file from setup.cfg #135

merged 1 commit into from
Jun 2, 2020

Conversation

jdufresne
Copy link
Contributor

Starting with wheel 0.32.0 (2018-09-29), the "license_file" option is
deprecated.

https://wheel.readthedocs.io/en/stable/news.html

The wheel will continue to include LICENSE, it is now included
automatically:

https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file

Starting with wheel 0.32.0 (2018-09-29), the "license_file" option is
deprecated.

https://wheel.readthedocs.io/en/stable/news.html

The wheel will continue to include LICENSE, it is now included
automatically:

https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file
@McSinyx
Copy link

McSinyx commented Feb 26, 2020

While this is true for wheels, it does not apply for source distribution. At the time of writing, setuptools have yet to support license_files so I guess we'll have to stick to the wheel-deprecated option.

@jdufresne
Copy link
Contributor Author

The source distribution continues to include the LICENSE.txt file. There is no additional action required for it and we don't need to rely on a deprecated feature to do it. It is included by the MANIFEST.in file:

include LICENSE.txt

This is easy to demonstrate by running python3 setup.py sdist then inspecting the .tar.gz file. Here is what I see:

 drwxrwxr-x     jon/jon           0 appdirs-1.4.4/
 -rw-rw-r--     jon/jon        3668 appdirs-1.4.4/CHANGES.rst
 -rw-rw-r--     jon/jon        1097 appdirs-1.4.4/LICENSE.txt
 -rw-rw-r--     jon/jon          90 appdirs-1.4.4/MANIFEST.in
 -rw-rw-r--     jon/jon       11250 appdirs-1.4.4/PKG-INFO
 -rw-rw-r--     jon/jon        4345 appdirs-1.4.4/README.rst
 drwxrwxr-x     jon/jon           0 appdirs-1.4.4/appdirs.egg-info/
 -rw-rw-r--     jon/jon       11250 appdirs-1.4.4/appdirs.egg-info/PKG-INFO
 -rw-rw-r--     jon/jon         234 appdirs-1.4.4/appdirs.egg-info/SOURCES.txt
 -rw-rw-r--     jon/jon           1 appdirs-1.4.4/appdirs.egg-info/dependency_links.txt
 -rw-rw-r--     jon/jon           8 appdirs-1.4.4/appdirs.egg-info/top_level.txt
 -rw-rw-r--     jon/jon       25018 appdirs-1.4.4/appdirs.py
 -rw-rw-r--     jon/jon          67 appdirs-1.4.4/setup.cfg
 -rw-rw-r--     jon/jon        2101 appdirs-1.4.4/setup.py
 drwxrwxr-x     jon/jon           0 appdirs-1.4.4/test/
 -rw-rw-r--     jon/jon           0 appdirs-1.4.4/test/__init__.py
 -rw-rw-r--     jon/jon        1309 appdirs-1.4.4/test/test_api.py

Notice LICENSE.txt is still included.

@McSinyx
Copy link

McSinyx commented Feb 26, 2020

You are right, I missed that. With license_file in setup.cfg alone setuptools can find the file but since we want to maximize compatibility MANIFEST.in is a better choice.

@zoofood
Copy link
Contributor

zoofood commented Jun 2, 2020

LGTM

@zoofood zoofood merged commit c94974d into ActiveState:master Jun 2, 2020
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