[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - include.py:1.35
Fred L. Drake, Jr.
fred at zope.com
Wed Apr 28 17:03:51 EDT 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv4893
Modified Files:
include.py
Log Message:
- make sure the destination directory exists event if we don't use
copyTree() to create the distribution
- fix addIncludes() to reflect the change of the internal structure of
Specification.includes
=== Packages/zpkgtools/zpkgtools/include.py 1.34 => 1.35 ===
--- Packages/zpkgtools/zpkgtools/include.py:1.34 Wed Apr 28 16:01:10 2004
+++ Packages/zpkgtools/zpkgtools/include.py Wed Apr 28 17:03:50 2004
@@ -289,6 +289,10 @@
spec = Specification(self.source, None, "collection")
destination = os.path.abspath(destination)
if spec.includes:
+ if not os.path.exists(destination):
+ os.mkdir(destination)
+ shutil.copymode(spec.source, destination)
+ shutil.copystat(spec.source, destination)
self.addIncludes(destination, spec)
else:
self.copyTree(spec.source, destination)
@@ -379,7 +383,7 @@
def addIncludes(self, destination, spec):
"""Process all the inclusion from a specification."""
- for relpath, source in spec.includes.iteritems():
+ for source, relpath in spec.includes.iteritems():
self.addSingleInclude(relpath, source, destination)
def addSingleInclude(self, relpath, source, destination):
More information about the Zope-CVS
mailing list