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

Fred L. Drake, Jr. fred at zope.com
Sat Mar 13 00:56:25 EST 2004


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

Modified Files:
	zpkg 
Log Message:
- add the ZPL blurb
- minor cleanup of the imports


=== Packages/zpkgtools/bin/zpkg 1.7 => 1.8 ===
--- Packages/zpkgtools/bin/zpkg:1.7	Sat Mar 13 00:31:36 2004
+++ Packages/zpkgtools/bin/zpkg	Sat Mar 13 00:56:24 2004
@@ -1,4 +1,17 @@
 #!/usr/bin/env python2.3
+##############################################################################
+#
+# Copyright (c) 2004 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
 
 import optparse
 import os
@@ -6,22 +19,20 @@
 import sys
 import tempfile
 
-script = os.path.realpath(__file__)
-here = os.path.dirname(script)
-
 try:
     import zpkgtools
 except ImportError:
     # Not installed; running from development copy:
+    here = os.path.dirname(os.path.realpath(__file__))
     basedir = os.path.dirname(here)
     sys.path.append(basedir)
     import zpkgtools
 
 from zpkgtools import config
 from zpkgtools import cvsloader
+from zpkgtools import include
 from zpkgtools import locationmap
 from zpkgtools import publication
-from zpkgtools.include import InclusionProcessor
 
 
 class Application:
@@ -57,8 +68,8 @@
         os.mkdir(self.destination)
         pkgname = self.metadata.name
 
-        self.ip = InclusionProcessor(self.source,
-                                     os.path.join(self.destination, pkgname))
+        self.ip = include.InclusionProcessor(
+            self.source, os.path.join(self.destination, pkgname))
         try:
             self.ip.createDistributionTree()
         except cvsloader.CvsLoadingError, e:
@@ -67,8 +78,8 @@
 
     def buildCollectionDistribution(self):
         # Build the destination directory:
-        self.ip = InclusionProcessor(self.source,
-                                     self.destination)
+        self.ip = include.InclusionProcessor(self.source,
+                                             self.destination)
         try:
             self.ip.createDistributionTree()
         except cvsloader.CvsLoadingError, e:




More information about the Zope-CVS mailing list