[Checkins] SVN: Sandbox/baijum/z3hello/trunk/ - Generate zope.conf from template using variable
Baiju M
baiju.m.mail at gmail.com
Fri Jan 1 03:43:46 EST 2010
Log message for revision 107482:
- Generate zope.conf from template using variable
from buildout conf
- Final configurations will be inside etc
- Startup script expect location of zope.conf
from PasteDeploy conf file
Changed:
U Sandbox/baijum/z3hello/trunk/buildout.cfg
U Sandbox/baijum/z3hello/trunk/deploy.ini
A Sandbox/baijum/z3hello/trunk/etc/
A Sandbox/baijum/z3hello/trunk/etc/site.zcml
D Sandbox/baijum/z3hello/trunk/site.zcml
U Sandbox/baijum/z3hello/trunk/src/z3hello/startup.py
A Sandbox/baijum/z3hello/trunk/templates/
A Sandbox/baijum/z3hello/trunk/templates/zope_conf.in
A Sandbox/baijum/z3hello/trunk/var/blob/
D Sandbox/baijum/z3hello/trunk/var/blobs/
A Sandbox/baijum/z3hello/trunk/var/filestorage/
A Sandbox/baijum/z3hello/trunk/var/log/
D Sandbox/baijum/z3hello/trunk/zope.conf
-=-
Modified: Sandbox/baijum/z3hello/trunk/buildout.cfg
===================================================================
--- Sandbox/baijum/z3hello/trunk/buildout.cfg 2010-01-01 07:03:38 UTC (rev 107481)
+++ Sandbox/baijum/z3hello/trunk/buildout.cfg 2010-01-01 08:43:46 UTC (rev 107482)
@@ -1,6 +1,14 @@
+[config]
+site_zcml = ${buildout:directory}/etc/site.zcml
+blob = ${buildout:directory}/var/blob
+filestorage = ${buildout:directory}/var/filestorage
+log = ${buildout:directory}/var/log
+
[buildout]
develop = .
-parts = app test
+parts = app
+ zope_conf
+ test
[app]
recipe = zc.recipe.egg
@@ -11,7 +19,10 @@
PasteDeploy
interpreter = python
+[zope_conf]
+recipe = collective.recipe.template
+input = templates/zope_conf.in
+output = etc/zope.conf
[test]
recipe = zc.recipe.testrunner
-defaults = ['--tests-pattern', '^f?tests$']
eggs = z3hello
Modified: Sandbox/baijum/z3hello/trunk/deploy.ini
===================================================================
--- Sandbox/baijum/z3hello/trunk/deploy.ini 2010-01-01 07:03:38 UTC (rev 107481)
+++ Sandbox/baijum/z3hello/trunk/deploy.ini 2010-01-01 08:43:46 UTC (rev 107482)
@@ -5,3 +5,8 @@
use = egg:Paste#http
host = 127.0.0.1
port = 8080
+
+[DEFAULT]
+# set the name of the zope.conf file
+zope_conf = %(here)s/etc/zope.conf
+
Property changes on: Sandbox/baijum/z3hello/trunk/etc
___________________________________________________________________
Added: svn:ignore
+ zope.conf
Copied: Sandbox/baijum/z3hello/trunk/etc/site.zcml (from rev 107444, Sandbox/baijum/z3hello/trunk/site.zcml)
===================================================================
--- Sandbox/baijum/z3hello/trunk/etc/site.zcml (rev 0)
+++ Sandbox/baijum/z3hello/trunk/etc/site.zcml 2010-01-01 08:43:46 UTC (rev 107482)
@@ -0,0 +1,6 @@
+<configure
+ xmlns='http://namespaces.zope.org/zope'>
+
+ <include package="z3hello" file="application.zcml" />
+
+</configure>
Deleted: Sandbox/baijum/z3hello/trunk/site.zcml
===================================================================
--- Sandbox/baijum/z3hello/trunk/site.zcml 2010-01-01 07:03:38 UTC (rev 107481)
+++ Sandbox/baijum/z3hello/trunk/site.zcml 2010-01-01 08:43:46 UTC (rev 107482)
@@ -1,6 +0,0 @@
-<configure
- xmlns='http://namespaces.zope.org/zope'>
-
- <include package="z3hello" file="application.zcml" />
-
-</configure>
Modified: Sandbox/baijum/z3hello/trunk/src/z3hello/startup.py
===================================================================
--- Sandbox/baijum/z3hello/trunk/src/z3hello/startup.py 2010-01-01 07:03:38 UTC (rev 107481)
+++ Sandbox/baijum/z3hello/trunk/src/z3hello/startup.py 2010-01-01 08:43:46 UTC (rev 107482)
@@ -1,6 +1,5 @@
-import os
import zope.app.wsgi
-def application_factory(global_conf, conf='zope.conf'):
- zope_conf = os.path.join(global_conf['here'], conf)
+def application_factory(global_conf):
+ zope_conf = global_conf['zope_conf']
return zope.app.wsgi.getWSGIApplication(zope_conf)
Copied: Sandbox/baijum/z3hello/trunk/templates/zope_conf.in (from rev 107444, Sandbox/baijum/z3hello/trunk/zope.conf)
===================================================================
--- Sandbox/baijum/z3hello/trunk/templates/zope_conf.in (rev 0)
+++ Sandbox/baijum/z3hello/trunk/templates/zope_conf.in 2010-01-01 08:43:46 UTC (rev 107482)
@@ -0,0 +1,46 @@
+# Identify the component configuration used to define the site:
+site-definition ${config:site_zcml}
+
+<zodb>
+ # Wrap standard FileStorage with BlobStorage proxy to get ZODB blobs
+ # support.
+ # This won't be needed with ZODB 3.9, as its FileStorage supports
+ # blobs by itself. If you use ZODB 3.9, remove the proxy and specify
+ # the blob-dir parameter right in in filestorage, just after path.
+ <blobstorage>
+ blob-dir ${config:blob}
+ <filestorage>
+ path ${config:filestorage}/Data.fs
+ </filestorage>
+ </blobstorage>
+
+# 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 both a file and to standard output (STDOUT).
+ # The "path" setting can be a relative or absolute filesystem path or
+ # the tokens STDOUT or STDERR.
+
+ <logfile>
+ path ${config:log}/z3.log
+ formatter zope.exceptions.log.Formatter
+ </logfile>
+
+ <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
Deleted: Sandbox/baijum/z3hello/trunk/zope.conf
===================================================================
--- Sandbox/baijum/z3hello/trunk/zope.conf 2010-01-01 07:03:38 UTC (rev 107481)
+++ Sandbox/baijum/z3hello/trunk/zope.conf 2010-01-01 08:43:46 UTC (rev 107482)
@@ -1,46 +0,0 @@
-# Identify the component configuration used to define the site:
-site-definition site.zcml
-
-<zodb>
- # Wrap standard FileStorage with BlobStorage proxy to get ZODB blobs
- # support.
- # This won't be needed with ZODB 3.9, as its FileStorage supports
- # blobs by itself. If you use ZODB 3.9, remove the proxy and specify
- # the blob-dir parameter right in in filestorage, just after path.
- <blobstorage>
- blob-dir var/blobs
- <filestorage>
- path var/Data.fs
- </filestorage>
- </blobstorage>
-
-# 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 both a file and to standard output (STDOUT).
- # The "path" setting can be a relative or absolute filesystem path or
- # the tokens STDOUT or STDERR.
-
- <logfile>
- path log/z3.log
- formatter zope.exceptions.log.Formatter
- </logfile>
-
- <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
More information about the checkins
mailing list