[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - app.py:1.3
Fred L. Drake, Jr.
fred at zope.com
Wed Mar 31 13:34:52 EST 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv5797
Modified Files:
app.py
Log Message:
- update to use the new API for creating manifest lists
- make InclusionProcessor.copyTree() ignore the test packages for
support code cleanly (without breaking or munging the manifest in
weird ways!)
=== Packages/zpkgtools/zpkgtools/app.py 1.2 => 1.3 ===
--- Packages/zpkgtools/zpkgtools/app.py:1.2 Wed Mar 31 12:09:42 2004
+++ Packages/zpkgtools/zpkgtools/app.py Wed Mar 31 13:34:52 2004
@@ -76,9 +76,7 @@
self.ip = include.InclusionProcessor(
self.source, os.path.join(self.destination, pkgname))
- # XXX Ouch! Need a better way to deal with this. The
- # InclusionProcessor API doesn't smell right.
- self.ip.manifest_prefix = os.path.join(self.destination, "")
+ self.manifest = self.ip.add_manifest(self.destination)
try:
self.ip.createDistributionTree()
except cvsloader.CvsLoadingError, e:
@@ -102,6 +100,7 @@
# Build the destination directory:
self.ip = include.InclusionProcessor(self.source,
self.destination)
+ self.manifest = self.ip.add_manifest(self.destination)
try:
self.ip.createDistributionTree()
except cvsloader.CvsLoadingError, e:
@@ -153,10 +152,10 @@
# Since we might actually be including zpkgtools as an
# installable package, we only do this if we need to:
if not os.path.exists(zpkgtools_dest):
- self.ip.copyTree(zpkgtools.__path__[0], zpkgtools_dest)
+ tests_dir = os.path.join(zpkgtools.__path__[0], "tests")
+ self.ip.copyTree(zpkgtools.__path__[0], zpkgtools_dest,
+ excludes={tests_dir: tests_dir})
tests_dir = os.path.join(zpkgtools_dest, "tests")
- # XXX We could toss the tests, but that would screw up the
- # manifest, so we'll leave them in for now.
# now we need to find setuptools:
setuptools_dest = os.path.join(self.destination, "setuptools")
if os.path.exists(setuptools_dest):
@@ -179,17 +178,17 @@
if source is None:
source = self.loader.load(url)
- self.ip.copyTree(source, setuptools_dest)
- tests_dir = os.path.join(setuptools_dest, "tests")
- # XXX We could toss the tests, but that would screw up the
- # manifest, so we'll leave them in for now.
+ tests_dir = os.path.join(source, "tests")
+ self.ip.copyTree(source, setuptools_dest,
+ excludes={tests_dir: tests_dir})
def createManifest(self):
if self.ip is None:
return
manifest_path = os.path.join(self.destination, "MANIFEST")
+ self.ip.add_output(manifest_path)
f = file(manifest_path, "w")
- for name in self.ip.manifest:
+ for name in self.manifest:
print >>f, name
f.close()
More information about the Zope-CVS
mailing list