[Checkins] SVN: grok/trunk/ switch buildout to paster based template

Michael Haubenwallner michael at d2m.at
Fri Jul 3 09:33:36 EDT 2009


Log message for revision 101438:
  switch buildout to paster based template

Changed:
  U   grok/trunk/CHANGES.txt
  U   grok/trunk/CREDITS.txt
  U   grok/trunk/buildout.cfg
  A   grok/trunk/etc/
  A   grok/trunk/etc/README.txt
  A   grok/trunk/etc/debug.ini.in
  A   grok/trunk/etc/deploy.ini.in
  A   grok/trunk/etc/site.zcml.in
  A   grok/trunk/etc/zdaemon.conf.in
  A   grok/trunk/etc/zope.conf.in

-=-
Modified: grok/trunk/CHANGES.txt
===================================================================
--- grok/trunk/CHANGES.txt	2009-07-03 12:22:22 UTC (rev 101437)
+++ grok/trunk/CHANGES.txt	2009-07-03 13:33:35 UTC (rev 101438)
@@ -13,7 +13,10 @@
 * updated zope.publisher dependency to 3.4.8 (fix paster.httpserver
   related bugs in XMLRPC, PUT)
 
+* switched buildout to paster base template (like grokproject default)
+  https://bugs.launchpad.net/grok/+bug/307197
 
+
 1.0a4 (2009-05-21)
 ==================
 

Modified: grok/trunk/CREDITS.txt
===================================================================
--- grok/trunk/CREDITS.txt	2009-07-03 12:22:22 UTC (rev 101437)
+++ grok/trunk/CREDITS.txt	2009-07-03 13:33:35 UTC (rev 101438)
@@ -44,6 +44,8 @@
 * Sylvain Viollon (work on martian, grokcore.formlib, grokcore.view,
   grokcore.viewlet)
 
+* Michael Haubenwallner (WSGI support)
+
 * ME GROK (team mascot)
 
 Thank you

Modified: grok/trunk/buildout.cfg
===================================================================
--- grok/trunk/buildout.cfg	2009-07-03 12:22:22 UTC (rev 101437)
+++ grok/trunk/buildout.cfg	2009-07-03 13:33:35 UTC (rev 101438)
@@ -5,9 +5,9 @@
     docs
     interpreter
     grokwiki
-    zopectl
-    data
-    test
+    data log etc test
+    zpasswd
+    zope_conf site_zcml zdaemon_conf deploy_ini debug_ini
     bundlemaker
 develop =
     .
@@ -16,8 +16,6 @@
 versions = versions
 extensions = buildout.dumppickedversions
 
-[versions]
-
 [docs]
 recipe = zc.recipe.egg
 eggs = grokdocs
@@ -25,56 +23,63 @@
 [interpreter]
 recipe = zc.recipe.egg
 eggs = grokwiki
-interpreter = python
+interpreter = grokpy
 
 [grokwiki]
-recipe = zc.zope3recipes>=0.5.3:application
+recipe = zc.recipe.egg
 eggs = grokwiki
-site.zcml = <include package="grokwiki" />
-            <include package="zope.app.twisted" />
+       z3c.evalexception>=2.0
+       Paste
+       PasteScript
+       PasteDeploy
 
-            <unauthenticatedPrincipal id="zope.anybody"
-                                      title="Unauthenticated User" />
-            <unauthenticatedGroup id="zope.Anybody"
-                                  title="Unauthenticated Users" />
-            <authenticatedGroup id="zope.Authenticated"
-                                title="Authenticated Users" />
-            <everybodyGroup id="zope.Everybody"
-                            title="All Users" />
-            <principal id="zope.manager"
-                       title="Manager"
-                       login="grok"
-                       password_manager="Plain Text"
-                       password="grok"
-                       />
+[data]
+recipe = zc.recipe.filestorage
 
-            <!-- Replace the following directive if you do not want
-                 public access -->
-            <grant permission="zope.View"
-                   principal="zope.Anybody" />
-            <grant permission="zope.app.dublincore.view"
-                   principal="zope.Anybody" />
+[log]
+recipe = zc.recipe.filestorage
 
-            <role id="zope.Manager" title="Site Manager" />
-            <role id="zope.Member" title="Site Member" />
-            <grantAll role="zope.Manager" />
-            <grant role="zope.Manager"
-                   principal="zope.manager" />
-
-[data]
+[etc]
 recipe = zc.recipe.filestorage
 
-# this section named so that the start/stop script is called bin/zopectl
-[zopectl]
-recipe = zc.zope3recipes:instance
-application = grokwiki
-zope.conf = ${data:zconfig}
-
 [test]
 recipe = zc.recipe.testrunner
 eggs = grok
 defaults = ['--tests-pattern', '^f?tests$', '-v']
 
+# This section is named so that the zpasswd utility is
+# called `zpasswd`
+[zpasswd]
+recipe = z3c.recipe.dev:script
+eggs = grokwiki
+module = zope.app.server.zpasswd
+method = main
+
+[zope_conf]
+recipe = z3c.recipe.template
+input = etc/zope.conf.in
+output = ${buildout:parts-directory}/etc/zope.conf
+
+[site_zcml]
+recipe = z3c.recipe.template
+input = etc/site.zcml.in
+output = ${buildout:parts-directory}/etc/site.zcml
+
+[zdaemon_conf]
+recipe = z3c.recipe.template
+input = etc/zdaemon.conf.in
+output = ${buildout:parts-directory}/etc/zdaemon.conf
+
+[deploy_ini]
+recipe = z3c.recipe.template
+input = etc/deploy.ini.in
+output = ${buildout:parts-directory}/etc/deploy.ini
+
+[debug_ini]
+recipe = z3c.recipe.template
+input = etc/debug.ini.in
+output = ${buildout:parts-directory}/etc/debug.ini
+
 [bundlemaker]
 recipe = z3c.recipe.eggbasket:creator
 egg = grok

Added: grok/trunk/etc/README.txt
===================================================================
--- grok/trunk/etc/README.txt	                        (rev 0)
+++ grok/trunk/etc/README.txt	2009-07-03 13:33:35 UTC (rev 101438)
@@ -0,0 +1,26 @@
+In this directory you can find templates which are used by
+``zc.buildout`` to create the configuration files in the parts/etc/ subdir
+of your project.
+
+If you modify files in this directory, you have to run::
+
+  $ bin/buildout
+
+afterwards to rebuild the configuration files in parts/etc/.
+
+In the templates you can use placesholders recognized by zc.buildout
+to name local paths, etc. A zc.buildout placeholder looks like this::
+
+  ${buildout:directory}
+
+which gives you the path of the project directory and will be
+substituted with the real path when you run buildout the next
+time. The set of available placeholders depends on your
+buildout.cfg.
+
+You can also modify files in parts/etc directly, but those changes
+will be overwritten after running bin/buildout the next time.
+
+To run your project you can do::
+
+  $ bin/paster serve parts/etc/deploy.ini

Added: grok/trunk/etc/debug.ini.in
===================================================================
--- grok/trunk/etc/debug.ini.in	                        (rev 0)
+++ grok/trunk/etc/debug.ini.in	2009-07-03 13:33:35 UTC (rev 101438)
@@ -0,0 +1,66 @@
+# debug.ini
+#
+# Debugging configuration for use with paster/WSGI
+#
+
+[loggers]
+keys = root, wsgi
+
+[handlers]
+keys = console, accesslog
+
+[formatters]
+keys = generic, accesslog
+
+[formatter_generic]
+format = %(asctime)s %(levelname)s [%(name)s] %(message)s
+
+[formatter_accesslog]
+format = %(message)s
+
+[handler_console]
+class = StreamHandler
+args = (sys.stderr,)
+level = NOTSET
+formatter = generic
+
+[handler_accesslog]
+class = FileHandler
+args = (os.path.join(r'${buildout:directory}', 'parts', 'log', 'access.log'),
+        'a')
+level = INFO
+formatter = accesslog
+
+[logger_root]
+level = INFO
+handlers = console
+
+[logger_wsgi]
+level = INFO
+handlers = accesslog
+qualname = wsgi
+propagate = 0
+
+[filter:translogger]
+use = egg:Paste#translogger
+setup_console_handler = False
+logger_name = wsgi
+
+[filter-app:main]
+# Change the last part from 'ajax' to 'pdb' for a post-mortem debugger
+# on the console:
+use = egg:z3c.evalexception#ajax
+next = zope
+
+[app:zope]
+use = egg:grokwiki
+filter-with = translogger
+
+[server:main]
+use = egg:Paste#http
+host = 127.0.0.1
+port = 8080
+
+[DEFAULT]
+# set the name of the zope.conf file
+zope_conf = %(here)s/zope.conf
\ No newline at end of file

Added: grok/trunk/etc/deploy.ini.in
===================================================================
--- grok/trunk/etc/deploy.ini.in	                        (rev 0)
+++ grok/trunk/etc/deploy.ini.in	2009-07-03 13:33:35 UTC (rev 101438)
@@ -0,0 +1,60 @@
+# deploy.ini
+#
+# Deployment configuration for use with paster/WSGI
+#
+
+[loggers]
+keys = root, wsgi
+
+[handlers]
+keys = console, accesslog
+
+[formatters]
+keys = generic, accesslog
+
+[logger_root]
+level = INFO
+handlers = console
+
+[logger_wsgi]
+level = INFO
+handlers = accesslog
+qualname = wsgi
+propagate = 0
+
+[handler_console]
+class = StreamHandler
+args = (sys.stderr,)
+level = NOTSET
+formatter = generic
+
+[handler_accesslog]
+class = FileHandler
+args = (os.path.join(r'${buildout:directory}', 'parts', 'log', 'access.log'),
+        'a')
+level = INFO
+formatter = accesslog
+
+[formatter_generic]
+format = %(asctime)s %(levelname)s [%(name)s] %(message)s
+
+[formatter_accesslog]
+format = %(message)s
+
+[filter:translogger]
+use = egg:Paste#translogger
+setup_console_handler = False
+logger_name = wsgi
+
+[app:main]
+use = egg:grokwiki
+filter-with = translogger
+
+[server:main]
+use = egg:Paste#http
+host = 127.0.0.1
+port = 8080
+
+[DEFAULT]
+# set the name of the zope.conf file
+zope_conf = %(here)s/zope.conf

Added: grok/trunk/etc/site.zcml.in
===================================================================
--- grok/trunk/etc/site.zcml.in	                        (rev 0)
+++ grok/trunk/etc/site.zcml.in	2009-07-03 13:33:35 UTC (rev 101438)
@@ -0,0 +1,36 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+           i18n_domain="grokwiki">
+
+  <include package="grokwiki" />
+
+    <configure i18n_domain="grokwiki">
+    
+      <unauthenticatedPrincipal id="zope.anybody"
+                                title="Unauthenticated User" />
+      <unauthenticatedGroup id="zope.Anybody"
+                            title="Unauthenticated Users" />
+      <authenticatedGroup id="zope.Authenticated"
+                        title="Authenticated Users" />
+      <everybodyGroup id="zope.Everybody"
+                      title="All Users" />
+      <principal id="zope.manager"
+                 title="Manager"
+                 login="grok"
+                 password_manager="SHA1"
+                 password="24aaefba739bd029629243732eb682db005a7541f7509622"
+                 />
+
+      <!-- Replace the following directive if you do not want
+           public access -->
+      <grant permission="zope.View"
+             principal="zope.Anybody" />
+      <grant permission="zope.app.dublincore.view"
+             principal="zope.Anybody" />
+
+      <role id="zope.Manager" title="Site Manager" />
+      <role id="zope.Member" title="Site Member" />
+      <grantAll role="zope.Manager" />
+      <grant role="zope.Manager"
+             principal="zope.manager" />
+   </configure>
+</configure>
\ No newline at end of file

Added: grok/trunk/etc/zdaemon.conf.in
===================================================================
--- grok/trunk/etc/zdaemon.conf.in	                        (rev 0)
+++ grok/trunk/etc/zdaemon.conf.in	2009-07-03 13:33:35 UTC (rev 101438)
@@ -0,0 +1,8 @@
+<runner>
+  program bin/paster serve ${buildout:directory}/parts/etc/deploy.ini
+  daemon on
+  transcript ${buildout:directory}/parts/log/zdaemon.log
+  socket-name ${buildout:directory}/parts/log/zdaemonsock
+  # Enable this to run the child process as a different user
+  # user zope
+</runner>

Added: grok/trunk/etc/zope.conf.in
===================================================================
--- grok/trunk/etc/zope.conf.in	                        (rev 0)
+++ grok/trunk/etc/zope.conf.in	2009-07-03 13:33:35 UTC (rev 101438)
@@ -0,0 +1,42 @@
+# Identify the component configuration used to define the site:
+site-definition ${site_zcml:output}
+
+<zodb>
+  # Standard Filestorage
+  <filestorage>
+    path ${data:path}
+  </filestorage>
+
+# Uncomment this if you want to connect to a ZEO server instead:
+#  <zeoclient>
+#    server localhost:8100
+#    storage 1
+#    # ZEO client cache, in bytes
+#    cache-size 20MB
+#    # Uncomment to have a persistent disk cache
+#    #client zeo1
+#  </zeoclient>
+</zodb>
+
+<eventlog>
+  # This sets up logging to a file.
+  # The "path" setting can be a relative or absolute
+  # filesystem path.
+
+  <logfile>
+    path ${buildout:directory}/parts/log/z3.log
+    formatter zope.exceptions.log.Formatter
+  </logfile>
+
+  # This sets up logging to to standard output.
+  # The "path" setting can be the tokens STDOUT or STDERR
+  
+#  <logfile>
+#    path STDOUT
+#    formatter zope.exceptions.log.Formatter
+#  </logfile>
+</eventlog>
+
+# Comment this line to disable developer mode.  This should be done in
+# production
+devmode on
\ No newline at end of file



More information about the Checkins mailing list