Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed Apr 3, 2021
1 parent 0f34639 commit 608c376
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions changelog.d/2620.breaking.rst
@@ -1,5 +1,4 @@
If neither ``license_file`` nor ``license_files`` is specified, the ``sdist``
option will now auto-include files that match the following patterns:
``LICEN[CS]E*``, ``COPYING*``, ``NOTICE*``, ``AUTHORS*``.
This matches the behavior of ``bdist_wheel``.
Any ``exclude`` in ``MANIFEST.in`` will overwrite it. -- by :user:`cdce8p`
This matches the behavior of ``bdist_wheel``. -- by :user:`cdce8p`
1 change: 0 additions & 1 deletion docs/references/keywords.rst
Expand Up @@ -86,7 +86,6 @@ Keywords
A list of glob patterns for license related files that should be included.
If neither ``license_file`` nor ``license_files`` is specified, this option
defaults to ``LICEN[CS]E*``, ``COPYING*``, ``NOTICE*``, and ``AUTHORS*``.
Any ``exclude`` specified in ``MANIFEST.in`` will overwrite it.

``keywords``
A list of strings or a comma-separated string providing descriptive
Expand Down
3 changes: 3 additions & 0 deletions setuptools/command/sdist.py
Expand Up @@ -213,6 +213,9 @@ def check_license(self):
patterns.append(opts['license_file'][1])

if 'license_file' not in opts and 'license_files' not in opts:
# Default patterns match the ones wheel uses
# See https://wheel.readthedocs.io/en/stable/user_guide.html
# -> 'Including license files in the generated wheel file'
patterns = ('LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*')

for pattern in patterns:
Expand Down
3 changes: 1 addition & 2 deletions setuptools/tests/test_egg_info.py
Expand Up @@ -654,8 +654,7 @@ def test_setup_cfg_license_file(
'LICENSE-XYZ': "XYZ license"
}, ['LICENSE-ABC'], ['LICENSE-XYZ']), # subset is manually excluded
pytest.param({
'setup.cfg': DALS("""
"""),
'setup.cfg': "",
'LICENSE-ABC': "ABC license",
'COPYING-ABC': "ABC copying",
'NOTICE-ABC': "ABC notice",
Expand Down

0 comments on commit 608c376

Please sign in to comment.