[Zope-CVS] CVS: Packages/zpkgtools/bin - zpkg:1.12

Fred L. Drake, Jr. fred at zope.com
Wed Mar 17 14:09:53 EST 2004


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

Modified Files:
	zpkg 
Log Message:
generate setup.cfg (if needed) when building the release package, not when
the resulting setup.py is run for the first time; this makes it easier to
modify between unpacking the distribution and running the setup.py script


=== Packages/zpkgtools/bin/zpkg 1.11 => 1.12 ===
--- Packages/zpkgtools/bin/zpkg:1.11	Tue Mar 16 11:20:55 2004
+++ Packages/zpkgtools/bin/zpkg	Wed Mar 17 14:09:21 2004
@@ -32,6 +32,7 @@
 from zpkgtools import cvsloader
 from zpkgtools import include
 from zpkgtools import locationmap
+from zpkgtools import package
 from zpkgtools import publication
 
 
@@ -85,6 +86,18 @@
         except cvsloader.CvsLoadingError, e:
             print >>sys.stderr, e
             sys.exit(1)
+        pkgdir = os.path.join(self.destination, pkgname)
+        pkginfo = package.loadPackageInfo(pkgname, pkgdir, pkgname)
+        if pkginfo.documentation:
+            setup_cfg = os.path.join(self.destination, "setup.cfg")
+            prefix = "doc_files = "
+            s = "\n" + (" " * len(prefix))
+            f = open(setup_cfg, "w")
+            f.write("[bdist_rpm]\n")
+            f.write(prefix)
+            f.write(s.join(pkginfo.documentation))
+            f.write("\n")
+            f.close()
 
     def buildCollectionDistribution(self):
         # Build the destination directory:




More information about the Zope-CVS mailing list