Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Since setuptools 28.5.0, a "global-exclude .pyc" no longer matches .pyc files #849
Since commit bb45468, if a project's MANIFEST.in contains
The test below shows that this line worked in setuptools 28.4.0, and broke in setuptools 28.5.0.
I'm not sure whether this can be considered a bug: the previous implementation looked up patterns without any anchoring, whereas the new one forces users to explicitly include wildcards in their
diff --cc setuptools/tests/test_manifest.py index 6360270,ef4beda..0000000 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@@ -425,12 -464,22 +425,19 @@@ class TestFileListTest(TempDirTestCase) 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() + # recursive-include
added a commit
Nov 20, 2016
However, I will argue that the old behaviour is unexpected and not desired. In my opinion, a note in the Changelog about this breaking change should be included, rather than restoring the old behaviour. The new behaviour behaves much more like globbing does in other environments (e.g. a bash shell), and is less surprising. With the old behaviour, a pattern like
@timheap thanks! I do agree with you: I wouldn't consider "properly anchoring patterns" as a bug, but rather as a proper bugfix. I'm totally in favor of keeping the fixed behavior, and simply documenting "a longstanding bug has been fixed in passing while cleaning up this code — please fix your manifests.".