Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
In development
--------------

* #890: Revert #849. ``global-exclude .foo`` will not match all
``*.foo`` files any more. Package authors must add an explicit
wildcard, such as ``global-exclude *.foo``, to match all
``.foo`` files. See #886, #849.

v31.0.1
-------

Expand Down Expand Up @@ -132,7 +140,11 @@ v28.5.0

* #810: Tests are now invoked with tox and not setup.py test.
* #249 and #450 via #764: Avoid scanning the whole tree
when building the manifest.
when building the manifest. Also fixes a long-standing bug
where patterns in ``MANIFEST.in`` had implicit wildcard
matching. This caused ``global-exclude .foo`` to exclude
all ``*.foo`` files, but also ``global-exclude bar.py`` to
exclude ``foo_bar.py``.

v28.4.0
-------
Expand Down
4 changes: 2 additions & 2 deletions setuptools/command/egg_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def global_include(self, pattern):
"""
if self.allfiles is None:
self.findall()
match = translate_pattern(os.path.join('**', '*' + pattern))
match = translate_pattern(os.path.join('**', pattern))
found = [f for f in self.allfiles if match.match(f)]
self.extend(found)
return bool(found)
Expand All @@ -466,7 +466,7 @@ def global_exclude(self, pattern):
"""
Exclude all files anywhere that match the pattern.
"""
match = translate_pattern(os.path.join('**', '*' + pattern))
match = translate_pattern(os.path.join('**', pattern))
return self._remove_files(match.match)

def append(self, item):
Expand Down
12 changes: 0 additions & 12 deletions setuptools/tests/test_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,6 @@ def test_global_include(self):
assert file_list.files == ['a.py', l('d/c.py')]
self.assertWarnings()

file_list.process_template_line('global-include .txt')
file_list.sort()
assert file_list.files == ['a.py', 'b.txt', l('d/c.py')]
self.assertNoWarnings()

def test_global_exclude(self):
l = make_local_path
# global-exclude
Expand All @@ -470,13 +465,6 @@ def test_global_exclude(self):
assert file_list.files == ['b.txt']
self.assertWarnings()

file_list = FileList()
file_list.files = ['a.py', 'b.txt', l('d/c.pyc'), 'e.pyo']
file_list.process_template_line('global-exclude .py[co]')
file_list.sort()
assert file_list.files == ['a.py', 'b.txt']
self.assertNoWarnings()

def test_recursive_include(self):
l = make_local_path
# recursive-include
Expand Down