[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - include.py:1.12

Fred L. Drake, Jr. fred at zope.com
Tue Mar 30 22:44:28 EST 2004


Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv29343/zpkgtools

Modified Files:
	include.py 
Log Message:
initial cut at generating a MANIFEST; pretty rough


=== Packages/zpkgtools/zpkgtools/include.py 1.11 => 1.12 ===
--- Packages/zpkgtools/zpkgtools/include.py:1.11	Tue Mar 30 22:12:55 2004
+++ Packages/zpkgtools/zpkgtools/include.py	Tue Mar 30 22:44:28 2004
@@ -142,6 +142,8 @@
                                  % source)
         self.source = os.path.abspath(source)
         self.destination = os.path.abspath(destination)
+        self.manifest = []
+        self.manifest_prefix = os.path.join(self.destination, "")
         prefix = os.path.commonprefix([self.source, self.destination])
         if prefix == self.source:
             raise InclusionError("destination directory may not be"
@@ -217,7 +219,13 @@
 
     def add_output(self, path):
         # we're going to build the manifest here
-        pass
+        assert path.startswith(self.manifest_prefix)
+        relpath = path[len(self.manifest_prefix):]
+        parts = relpath.split(os.sep)
+        if len(parts) == 1:
+            self.manifest.append(parts[0])
+        else:
+            self.manifest.append(posixpath.join(*parts))
 
     def addSingleInclude(self, relpath, source):
         dirname, basename = os.path.split(relpath)




More information about the Zope-CVS mailing list