[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - include.py:1.29
Fred L. Drake, Jr.
fred at zope.com
Mon Apr 19 11:54:31 EDT 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv7366
Modified Files:
include.py
Log Message:
new API call to simplify processing all the includes from a
specification
=== Packages/zpkgtools/zpkgtools/include.py 1.28 => 1.29 ===
--- Packages/zpkgtools/zpkgtools/include.py:1.28 Mon Apr 19 11:39:02 2004
+++ Packages/zpkgtools/zpkgtools/include.py Mon Apr 19 11:54:30 2004
@@ -251,8 +251,7 @@
spec = Specification(self.source)
destination = os.path.abspath(destination)
self.copyTree(spec.source, destination, spec.excludes)
- for relpath, source in spec.includes.iteritems():
- self.addSingleInclude(relpath, source, destination)
+ self.addIncludes(destination, spec)
def copyTree(self, source, destination, excludes={}):
"""Populate the destination tree from the source tree.
@@ -350,6 +349,11 @@
if self.manifests[i][0] == prefix:
return self.manifests.pop(i)[1]
raise ValueError("no manifest for %s" % destination)
+
+ def addIncludes(self, destination, spec):
+ """Process all the inclusion from a specification."""
+ for relpath, source in spec.includes.iteritems():
+ self.addSingleInclude(relpath, source, destination)
def addSingleInclude(self, relpath, source, destination):
"""Process a single include specification line.
More information about the Zope-CVS
mailing list