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

"Fred L. Drake, Jr." <[email protected]>
Newsgroups gmane.comp.web.zope.public-cvs
Message-ID <[email protected]>
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()

_______________________________________________
Zope-CVS maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zope-cvs

Zope CVS instructions: http://dev.zope.org/CVS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.