[Checkins] SVN: lovely.recipe/trunk/ - merge from lovely-instance branch

Juergen Kartnaller juergen at kartnaller.at
Fri Aug 31 01:44:57 EDT 2007


Log message for revision 79398:
  - merge from lovely-instance branch
  
  - i18nextract allows the definition of a custem configure.zcml which is needed
    to be able to use it with package who do not contain a full configuration
    setup.
  
  - fix tests to run not only on jukart's mac :)
  
  

Changed:
  U   lovely.recipe/trunk/CHANGES.txt
  A   lovely.recipe/trunk/TODO.txt
  U   lovely.recipe/trunk/setup.py
  A   lovely.recipe/trunk/src/lovely/recipe/zeo/
  U   lovely.recipe/trunk/src/lovely/recipe/zeo/server.py
  A   lovely.recipe/trunk/src/lovely/recipe/zope/
  U   lovely.recipe/trunk/src/lovely/recipe/zope/zope.py

-=-
Modified: lovely.recipe/trunk/CHANGES.txt
===================================================================
--- lovely.recipe/trunk/CHANGES.txt	2007-08-31 04:23:39 UTC (rev 79397)
+++ lovely.recipe/trunk/CHANGES.txt	2007-08-31 05:44:57 UTC (rev 79398)
@@ -5,6 +5,15 @@
 After
 =====
 
+BIG TODO: add tests for lovely.recipe.zeo and lovely.recipe.zope to test and
+          to show for what this all is for.
+
+
+2007/08/31 0.3.0a3:
+===================
+
+- merge from lovely-instance branch
+
 - i18nextract allows the definition of a custem configure.zcml which is needed
   to be able to use it with package who do not contain a full configuration
   setup.
@@ -12,6 +21,12 @@
 - fix tests to run not only on jukart's mac
 
 
+2007/06/04 0.3.0a2:
+===================
+
+- recipe for zope instances (instance, app); no tests as well :(
+
+
 2007/06/04 0.3.0a1:
 ===================
 

Copied: lovely.recipe/trunk/TODO.txt (from rev 79382, lovely.recipe/branches/lovely-instance/TODO.txt)
===================================================================
--- lovely.recipe/trunk/TODO.txt	                        (rev 0)
+++ lovely.recipe/trunk/TODO.txt	2007-08-31 05:44:57 UTC (rev 79398)
@@ -0,0 +1 @@
+tests for lovely.recipe.instance
\ No newline at end of file

Modified: lovely.recipe/trunk/setup.py
===================================================================
--- lovely.recipe/trunk/setup.py	2007-08-31 04:23:39 UTC (rev 79397)
+++ lovely.recipe/trunk/setup.py	2007-08-31 05:44:57 UTC (rev 79398)
@@ -6,11 +6,14 @@
 mkfile = lovely.recipe.fs.mkfile:Mkfile
 i18n = lovely.recipe.i18n.i18n:I18n
 importchecker = lovely.recipe.importchecker.app:ImportChecker
+instance = lovely.recipe.zope.zope:LovelyInstance
+app = lovely.recipe.zope.zope:LovelyApp
+server = lovely.recipe.zeo:LovelyServer
 """
 
 setup (
     name='lovely.recipe',
-    version='0.3.0a1',
+    version='0.3.0a3',
     author = "Lovely Systems",
     author_email = "office at lovelysystems.com",
     license = "ZPL 2.1",
@@ -24,6 +27,9 @@
                         'zc.buildout',
                         'zc.recipe.egg',
                         'zope.app.locales',
+                        'zc.zope3recipes',
+                        'zc.zodbrecipes',
+                        'ZConfig'
                         ],
     entry_points = entry_points,
     zip_safe = True,

Copied: lovely.recipe/trunk/src/lovely/recipe/zeo (from rev 79382, lovely.recipe/branches/lovely-instance/src/lovely/recipe/zeo)

Modified: lovely.recipe/trunk/src/lovely/recipe/zeo/server.py
===================================================================
--- lovely.recipe/branches/lovely-instance/src/lovely/recipe/zeo/server.py	2007-08-30 13:25:07 UTC (rev 79382)
+++ lovely.recipe/trunk/src/lovely/recipe/zeo/server.py	2007-08-31 05:44:57 UTC (rev 79398)
@@ -35,3 +35,4 @@
         self.options['hostname'] = socket.gethostname()
         self.options['__name__'] = self.name
         self.applyIns()
+

Copied: lovely.recipe/trunk/src/lovely/recipe/zope (from rev 79382, lovely.recipe/branches/lovely-instance/src/lovely/recipe/zope)

Modified: lovely.recipe/trunk/src/lovely/recipe/zope/zope.py
===================================================================
--- lovely.recipe/branches/lovely-instance/src/lovely/recipe/zope/zope.py	2007-08-30 13:25:07 UTC (rev 79382)
+++ lovely.recipe/trunk/src/lovely/recipe/zope/zope.py	2007-08-31 05:44:57 UTC (rev 79398)
@@ -30,78 +30,78 @@
                                      site_zcml_template)
 
 # from http://svn.zope.org/zc.zope3recipes/trunk/zc/zope3recipes/recipes.py?rev=76910&r1=75888&r2=76910
-class ZConfigResource:	 
- 	 
-     def __init__(self, file, url=''):	 
+class ZConfigResource:
+
+     def __init__(self, file, url=''):
          self.file, self.url = file, url
 
 # from http://svn.zope.org/zc.zope3recipes/trunk/zc/zope3recipes/recipes.py?rev=76910&r1=75888&r2=76910
-class ZConfigSection(dict):	 
-	 
-     def __init__(self, type='', name='', data=None, sections=None):	 
-         dict.__init__(self)	 
-         if data:	 
-             self.update(data)	 
-         self.sections = sections or []	 
-         self.type, self.name = type, name	 
- 	 
-     def addValue(self, key, value, *args):	 
-         if key in self:	 
-             self[key].append(value)	 
-         else:	 
-             self[key] = [value]	 
- 	 
-     def __str__(self, pre=''):	 
-         result = []	 
-         if self.type:	 
-             if self.name:	 
-                 result = ['%s<%s %s>' % (pre, self.type, self.name)]	 
-             else:	 
-                 result = ['%s<%s>' % (pre, self.type)]	 
-             pre += '  '	 
- 	 
-         for name, values in sorted(self.items()):	 
-             for value in values:	 
-                 result.append('%s%s %s' % (pre, name, value))	 
- 	 
-         if self.sections and self:	 
-             result.append('')	 
- 	 
-         for section in self.sections:	 
-             result.append(section.__str__(pre))	 
- 	 
-         if self.type:	 
-             result.append('%s</%s>' % (pre[:-2], self.type))	 
-             result.append('')	 
- 	 
+class ZConfigSection(dict):
+
+     def __init__(self, type='', name='', data=None, sections=None):
+         dict.__init__(self)
+         if data:
+             self.update(data)
+         self.sections = sections or []
+         self.type, self.name = type, name
+
+     def addValue(self, key, value, *args):
+         if key in self:
+             self[key].append(value)
+         else:
+             self[key] = [value]
+
+     def __str__(self, pre=''):
+         result = []
+         if self.type:
+             if self.name:
+                 result = ['%s<%s %s>' % (pre, self.type, self.name)]
+             else:
+                 result = ['%s<%s>' % (pre, self.type)]
+             pre += '  '
+
+         for name, values in sorted(self.items()):
+             for value in values:
+                 result.append('%s%s %s' % (pre, name, value))
+
+         if self.sections and self:
+             result.append('')
+
+         for section in self.sections:
+             result.append(section.__str__(pre))
+
+         if self.type:
+             result.append('%s</%s>' % (pre[:-2], self.type))
+             result.append('')
+
          return '\n'.join(result).rstrip()+'\n'
 
 # from http://svn.zope.org/zc.zope3recipes/trunk/zc/zope3recipes/recipes.py?rev=76910&r1=75888&r2=76910
-class ZConfigContext:	 
- 	 
-     def __init__(self):	 
-         self.top = ZConfigSection()	 
-         self.sections = []	 
- 	 
-     def startSection(self, container, type, name):	 
-         newsec = ZConfigSection(type, name)	 
-         container.sections.append(newsec)	 
-         return newsec	 
- 	 
-     def endSection(self, container, type, name, newsect):	 
-         pass	 
- 	 
-     def importSchemaComponent(self, pkgname):	 
-         pass	 
- 	 
-     def includeConfiguration(self, section, newurl, defines):	 
-         raise NotImplementedError('includes are not supported')	 
- 
+class ZConfigContext:
 
+     def __init__(self):
+         self.top = ZConfigSection()
+         self.sections = []
+
+     def startSection(self, container, type, name):
+         newsec = ZConfigSection(type, name)
+         container.sections.append(newsec)
+         return newsec
+
+     def endSection(self, container, type, name, newsect):
+         pass
+
+     def importSchemaComponent(self, pkgname):
+         pass
+
+     def includeConfiguration(self, section, newurl, defines):
+         raise NotImplementedError('includes are not supported')
+
+
 # from http://svn.zope.org/zc.zope3recipes/trunk/zc/zope3recipes/recipes.py?rev=76910&r1=75888&r2=76910
-def ZConfigParse(file):	 
-     c = ZConfigContext()	 
-     ZConfig.cfgparser.ZConfigParser(ZConfigResource(file), c).parse(c.top)	 
+def ZConfigParse(file):
+     c = ZConfigContext()
+     ZConfig.cfgparser.ZConfigParser(ZConfigResource(file), c).parse(c.top)
      return c.top
 
 



More information about the Checkins mailing list