exclude pattern
This commit is contained in:
parent
3a937ddc96
commit
55576d6073
|
@ -6,6 +6,7 @@ from distutils.command.install import install
|
|||
from pprint import pprint
|
||||
from fileinput import FileInput
|
||||
from re import sub, match
|
||||
from fnmatch import fnmatch
|
||||
|
||||
from Configuration import *
|
||||
|
||||
|
@ -48,8 +49,9 @@ class Setup:
|
|||
def remove_excluded(self, paths, root, exclude):
|
||||
removal = []
|
||||
for path in paths:
|
||||
if normpath(join(root, path)) in exclude:
|
||||
removal.append(path)
|
||||
for pattern in exclude:
|
||||
if fnmatch(normpath(join(root, path)), pattern):
|
||||
removal.append(path)
|
||||
for path in removal:
|
||||
paths.remove(path)
|
||||
return paths
|
||||
|
|
Loading…
Reference in New Issue