[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - include.py:1.34
Fred L. Drake, Jr.
fred at zope.com
Wed Apr 28 16:01:41 EDT 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv25445/zpkgtools
Modified Files:
include.py
Log Message:
make wildcards work as documented
=== Packages/zpkgtools/zpkgtools/include.py 1.33 => 1.34 ===
--- Packages/zpkgtools/zpkgtools/include.py:1.33 Wed Apr 28 15:45:29 2004
+++ Packages/zpkgtools/zpkgtools/include.py Wed Apr 28 16:01:10 2004
@@ -234,17 +234,19 @@
self.group = group
def cook(self):
- return
- patterns = self.excludes
- self.excludes = []
+ patterns = self.includes.pop(None, [])
+ source = os.path.normpath(self.source)
+ prefix = os.path.join(source, "")
for pat in patterns:
- path = os.path.join(self.source, pat)
+ path = os.path.join(source, pat)
expansions = filter_names(glob.glob(path))
if not expansions:
raise InclusionSpecificationError(
- "exclusion %r doesn't match any files" % pat,
+ "%r doesn't match any files in <%s>" % (pat, self.group),
self.filename)
- self.excludes.extend(expansions)
+ for fn in expansions:
+ suffix = fn[len(prefix):]
+ self.includes[suffix] = suffix
class InclusionProcessor:
More information about the Zope-CVS
mailing list