Commit 56274b32 authored by Hatem Nassrat's avatar Hatem Nassrat

fixes #935 - allows for glob syntax in graft

parent 094862cd
......@@ -429,7 +429,9 @@ class FileList(_FileList):
def graft(self, dir):
"""Include all files from 'dir/'."""
found = distutils.filelist.findall(dir)
found = []
for match_dir in glob(dir):
found += distutils.filelist.findall(match_dir)
self.extend(found)
return bool(found)
......
......@@ -206,6 +206,15 @@ class TestManifestTest(TempDirTestCase):
l('app/static/app.css'), l('app/static/app.css.map')])
assert files == self.get_files()
def test_graft_glob_syntax(self):
"""Include the whole app/static/ directory."""
l = make_local_path
self.make_manifest("graft */static")
files = default_files | set([
l('app/static/app.js'), l('app/static/app.js.map'),
l('app/static/app.css'), l('app/static/app.css.map')])
assert files == self.get_files()
def test_graft_global_exclude(self):
"""Exclude all *.map files in the project."""
l = make_local_path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment