[Checkins] SVN: z3c.recipe.autoinclude/trunk/ - Fixed zope.app.xxx dependencies

Nikolay Kim fafhrd at datacom.kz
Wed Apr 15 08:05:35 EDT 2009


Log message for revision 99187:
  - Fixed zope.app.xxx dependencies
  
  - Added 'packages-exclude.zcml', list all exclude.zcml files
  
  
  

Changed:
  U   z3c.recipe.autoinclude/trunk/CHANGES.txt
  U   z3c.recipe.autoinclude/trunk/src/z3c/recipe/autoinclude/include.py

-=-
Modified: z3c.recipe.autoinclude/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.autoinclude/trunk/CHANGES.txt	2009-04-15 07:38:06 UTC (rev 99186)
+++ z3c.recipe.autoinclude/trunk/CHANGES.txt	2009-04-15 12:05:34 UTC (rev 99187)
@@ -2,7 +2,14 @@
 CHANGES
 =======
 
+0.2.0 (2009-04-15)
+------------------
 
+- Fixed zope.app.xxx dependencies
+
+- Added 'packages-exclude.zcml', list all exclude.zcml files
+
+
 0.1.0 (2009-04-06)
 ------------------
 

Modified: z3c.recipe.autoinclude/trunk/src/z3c/recipe/autoinclude/include.py
===================================================================
--- z3c.recipe.autoinclude/trunk/src/z3c/recipe/autoinclude/include.py	2009-04-15 07:38:06 UTC (rev 99186)
+++ z3c.recipe.autoinclude/trunk/src/z3c/recipe/autoinclude/include.py	2009-04-15 12:05:34 UTC (rev 99187)
@@ -40,10 +40,11 @@
         meta = []
         configure = []
         overrides = []
+        exclude = []
 
         for dist in dists:
             info = DependencyFinder(dist, ws).includableInfo(
-                ['meta.zcml', 'configure.zcml', 'overrides.zcml'])
+                ['meta.zcml', 'configure.zcml', 'overrides.zcml', 'exclude.zcml'])
 
             for pkg in info['meta.zcml']:
                 if pkg not in meta:
@@ -57,16 +58,34 @@
                 if pkg not in overrides:
                     overrides.append(pkg)
 
+            for pkg in info['exclude.zcml']:
+                if pkg not in exclude:
+                    exclude.append(pkg)
+
         meta = ''.join(
             ['<include package="%s" file="meta.zcml" />\n'%pkg for pkg in meta])
 
-        configure = ''.join(
-            ['<include package="%s" />\n'%pkg for pkg in configure])
-
         overrides = ''.join(
             ['<includeOverrides package="%s" file="overrides.zcml" />\n'%pkg 
              for pkg in overrides])
 
+        exclude = ''.join(
+            ['<include package="%s" file="exclude.zcml" />\n'%pkg for pkg in exclude])
+
+        configureData = ''.join(
+            ['<include package="%s" />\n'%pkg for pkg in configure])
+
+        # fix zope.app.xxx dependencies problem
+        if 'zope.app.appsetup' in configure:
+            configureData = (
+                '<include package="zope.app.appsetup" />\n' +
+                configureData)
+
+        if 'zope.app.zcmlfiles' in configure:
+            configureData = (
+                '<include package="zope.app.zcmlfiles" file="menus.zcml" />\n' +
+                configureData)
+
         dest = []
 
         location = self.location
@@ -79,11 +98,14 @@
             packages_zcml_template % meta)
 
         open(os.path.join(location, 'packages-configure.zcml'), 'w').write(
-            packages_zcml_template % configure)
+            packages_zcml_template % configureData)
 
         open(os.path.join(location, 'packages-overrides.zcml'), 'w').write(
             packages_zcml_template % overrides)
 
+        open(os.path.join(location, 'packages-exclude.zcml'), 'w').write(
+            packages_zcml_template % exclude)
+
         return dest
 
     update = install



More information about the Checkins mailing list