Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
3e6669a7
Commit
3e6669a7
authored
Dec 03, 2016
by
Jason R. Coombs
Committed by
GitHub
Dec 03, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #853 from timheap/global-exclude-glob
Fix #849 global-exclude globbing
parents
2e0b4d41
23aba916
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
setuptools/command/egg_info.py
setuptools/command/egg_info.py
+2
-2
setuptools/tests/test_manifest.py
setuptools/tests/test_manifest.py
+12
-0
No files found.
setuptools/command/egg_info.py
View file @
3e6669a7
...
...
@@ -457,7 +457,7 @@ class FileList(_FileList):
"""
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)
...
...
@@ -466,7 +466,7 @@ class FileList(_FileList):
"""
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):
...
...
setuptools/tests/test_manifest.py
View file @
3e6669a7
...
...
@@ -449,6 +449,11 @@ class TestFileListTest(TempDirTestCase):
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
...
...
@@ -465,6 +470,13 @@ 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()
def test_recursive_include(self):
l = make_local_path
# recursive-include
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment