[Zope-CVS] SVN: zpkgtools/branches/fdrake-zconfig-branch/zpkgtools/app.py - add ZConfig to the support directory

Fred L. Drake, Jr. fdrake at gmail.com
Tue Aug 30 12:48:57 EDT 2005


Log message for revision 38159:
  - add ZConfig to the support directory
  - fix call to zpkgtools.include.load(); remove argument thats no longer used
  

Changed:
  U   zpkgtools/branches/fdrake-zconfig-branch/zpkgtools/app.py

-=-
Modified: zpkgtools/branches/fdrake-zconfig-branch/zpkgtools/app.py
===================================================================
--- zpkgtools/branches/fdrake-zconfig-branch/zpkgtools/app.py	2005-08-30 15:57:24 UTC (rev 38158)
+++ zpkgtools/branches/fdrake-zconfig-branch/zpkgtools/app.py	2005-08-30 16:48:57 UTC (rev 38159)
@@ -21,6 +21,8 @@
 import sys
 import tempfile
 
+import ZConfig
+import zpkgsetup
 import zpkgtools
 
 from zpkgsetup import cfgparser
@@ -38,12 +40,13 @@
 from zpkgtools import runlog
 
 
-zpkgsetup_dir = os.path.join(
-    os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
-    "zpkgsetup")
+def package_resource(package):
+    dir = os.path.dirname(os.path.abspath(package.__path__[0]))
+    return urlutils.file_url(dir)
 
 DEFAULT_SUPPORT_PACKAGES = [
-    ("zpkgsetup", urlutils.file_url(zpkgsetup_dir)),
+    ("ZConfig",   package_resource(ZConfig)),
+    ("zpkgsetup", package_resource(zpkgsetup)),
     ]
 
 
@@ -382,7 +385,7 @@
                 # we need to re-load the specs to get the .source
                 # attribute of the specification objects correct
                 # XXX need test!
-                specs = include.load(source, url=self.url)
+                specs = include.load(source)
             self.ip.addIncludes(self.source, specs.loads)
         specs.collection.cook()
         specs.distribution.cook()



More information about the Zope-CVS mailing list