[Checkins] SVN: grokproject/trunk/ make configuration files use absolute paths

Michael Haubenwallner michael at d2m.at
Mon Dec 8 06:32:43 EST 2008


Log message for revision 93775:
  make configuration files use absolute paths

Changed:
  U   grokproject/trunk/README.txt
  D   grokproject/trunk/grokproject/template_paste/etc/zdaemon.conf
  A   grokproject/trunk/grokproject/template_paste/etc/zdaemon.conf_tmpl
  D   grokproject/trunk/grokproject/template_paste/etc/zope.conf
  A   grokproject/trunk/grokproject/template_paste/etc/zope.conf_tmpl
  D   grokproject/trunk/grokproject/template_paste/src/+package+/startup.py
  A   grokproject/trunk/grokproject/template_paste/src/+package+/startup.py_tmpl
  U   grokproject/trunk/grokproject/templates.py
  U   grokproject/trunk/tests.py

-=-
Modified: grokproject/trunk/README.txt
===================================================================
--- grokproject/trunk/README.txt	2008-12-08 11:21:53 UTC (rev 93774)
+++ grokproject/trunk/README.txt	2008-12-08 11:32:43 UTC (rev 93775)
@@ -1,5 +1,5 @@
-grokproject provides an easy way to get started with a `grok
-<http://cheeseshop.python.org/pypi/grok>`_ web application.  Simply
+grokproject provides an easy way to get started with a `Grok
+<http://pypi.python.org/pypi/grok>`_ web application.  Simply
 install ``grokproject``::
 
   $ easy_install grokproject
@@ -11,7 +11,7 @@
   ... many lines of output here
 
 This will not only create a project area for you to work in, it will
-also download and install grok and Zope 3 (the application server grok
+also download and install Grok and Zope 3 (the application server Grok
 is built on).
 
 After the project area has been created successfully, you will find an

Deleted: grokproject/trunk/grokproject/template_paste/etc/zdaemon.conf
===================================================================
--- grokproject/trunk/grokproject/template_paste/etc/zdaemon.conf	2008-12-08 11:21:53 UTC (rev 93774)
+++ grokproject/trunk/grokproject/template_paste/etc/zdaemon.conf	2008-12-08 11:32:43 UTC (rev 93775)
@@ -1,8 +0,0 @@
-<runner>
-  program bin/paster serve etc/deploy.ini
-  daemon on
-  transcript parts/log/zdaemon.log
-  socket-name parts/log/zdaemonsock
-  # Enable this to run the child process as a different user
-  # user zope
-</runner>
\ No newline at end of file

Copied: grokproject/trunk/grokproject/template_paste/etc/zdaemon.conf_tmpl (from rev 93772, grokproject/trunk/grokproject/template_paste/etc/zdaemon.conf)
===================================================================
--- grokproject/trunk/grokproject/template_paste/etc/zdaemon.conf_tmpl	                        (rev 0)
+++ grokproject/trunk/grokproject/template_paste/etc/zdaemon.conf_tmpl	2008-12-08 11:32:43 UTC (rev 93775)
@@ -0,0 +1,8 @@
+<runner>
+  program bin/paster serve ${package_directory}/etc/deploy.ini
+  daemon on
+  transcript ${package_directory}/parts/log/zdaemon.log
+  socket-name ${package_directory}/parts/log/zdaemonsock
+  # Enable this to run the child process as a different user
+  # user zope
+</runner>
\ No newline at end of file

Deleted: grokproject/trunk/grokproject/template_paste/etc/zope.conf
===================================================================
--- grokproject/trunk/grokproject/template_paste/etc/zope.conf	2008-12-08 11:21:53 UTC (rev 93774)
+++ grokproject/trunk/grokproject/template_paste/etc/zope.conf	2008-12-08 11:32:43 UTC (rev 93775)
@@ -1,39 +0,0 @@
-# Identify the component configuration used to define the site:
-site-definition etc/site.zcml
-
-<zodb>
-  # Standard Filestorage
-  <filestorage>
-    path parts/data/Data.fs
-  </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 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 parts/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
\ No newline at end of file

Copied: grokproject/trunk/grokproject/template_paste/etc/zope.conf_tmpl (from rev 93772, grokproject/trunk/grokproject/template_paste/etc/zope.conf)
===================================================================
--- grokproject/trunk/grokproject/template_paste/etc/zope.conf_tmpl	                        (rev 0)
+++ grokproject/trunk/grokproject/template_paste/etc/zope.conf_tmpl	2008-12-08 11:32:43 UTC (rev 93775)
@@ -0,0 +1,39 @@
+# Identify the component configuration used to define the site:
+site-definition ${package_directory}/etc/site.zcml
+
+<zodb>
+  # Standard Filestorage
+  <filestorage>
+    path ${package_directory}/parts/data/Data.fs
+  </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 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 ${package_directory}/parts/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
\ No newline at end of file

Deleted: grokproject/trunk/grokproject/template_paste/src/+package+/startup.py
===================================================================
--- grokproject/trunk/grokproject/template_paste/src/+package+/startup.py	2008-12-08 11:21:53 UTC (rev 93774)
+++ grokproject/trunk/grokproject/template_paste/src/+package+/startup.py	2008-12-08 11:32:43 UTC (rev 93775)
@@ -1,35 +0,0 @@
-import os
-import sys
-import code
-import zdaemon.zdctl
-import zope.app.wsgi
-import zope.app.debug
-
-def application_factory(global_conf, conf='../etc/zope.conf'):
-    zope_conf = os.path.join(global_conf['here'], conf)
-    return zope.app.wsgi.getWSGIApplication(zope_conf)
-
-def interactive_debug_prompt(zope_conf='etc/zope.conf'):
-    db = zope.app.wsgi.config(zope_conf)
-    debugger = zope.app.debug.Debugger.fromDatabase(db)
-    # Invoke an interactive interpreter shell
-    banner = ("Welcome to the interactive debug prompt.\n"
-              "The 'root' variable contains the ZODB root folder.\n"
-              "The 'app' variable contains the Debugger, 'app.publish(path)' "
-              "simulates a request.")
-    code.interact(banner=banner, local={'debugger': debugger,
-                                        'app':      debugger,
-                                        'root':     debugger.root()})
-
-class ControllerCommands(zdaemon.zdctl.ZDCmd):
-
-    def do_debug(self, rest):
-        interactive_debug_prompt()
-
-    def help_debug(self):
-        print "debug -- Initialize the application, providing a debugger"
-        print "         object at an interactive Python prompt."
-
-def zdaemon_controller(zdaemon_conf='etc/zdaemon.conf'):
-    args = ['-C', zdaemon_conf] + sys.argv[1:]
-    zdaemon.zdctl.main(args, options=None, cmdclass=ControllerCommands)
\ No newline at end of file

Copied: grokproject/trunk/grokproject/template_paste/src/+package+/startup.py_tmpl (from rev 93772, grokproject/trunk/grokproject/template_paste/src/+package+/startup.py)
===================================================================
--- grokproject/trunk/grokproject/template_paste/src/+package+/startup.py_tmpl	                        (rev 0)
+++ grokproject/trunk/grokproject/template_paste/src/+package+/startup.py_tmpl	2008-12-08 11:32:43 UTC (rev 93775)
@@ -0,0 +1,35 @@
+import os
+import sys
+import code
+import zdaemon.zdctl
+import zope.app.wsgi
+import zope.app.debug
+
+def application_factory(global_conf, conf='zope.conf'):
+    zope_conf = os.path.join(global_conf['here'], conf)
+    return zope.app.wsgi.getWSGIApplication(zope_conf)
+
+def interactive_debug_prompt(zope_conf='${package_directory}/etc/zope.conf'):
+    db = zope.app.wsgi.config(zope_conf)
+    debugger = zope.app.debug.Debugger.fromDatabase(db)
+    # Invoke an interactive interpreter shell
+    banner = ("Welcome to the interactive debug prompt.\n"
+              "The 'root' variable contains the ZODB root folder.\n"
+              "The 'app' variable contains the Debugger, 'app.publish(path)' "
+              "simulates a request.")
+    code.interact(banner=banner, local={'debugger': debugger,
+                                        'app':      debugger,
+                                        'root':     debugger.root()})
+
+class ControllerCommands(zdaemon.zdctl.ZDCmd):
+
+    def do_debug(self, rest):
+        interactive_debug_prompt()
+
+    def help_debug(self):
+        print "debug -- Initialize the application, providing a debugger"
+        print "         object at an interactive Python prompt."
+
+def zdaemon_controller(zdaemon_conf='${package_directory}/etc/zdaemon.conf'):
+    args = ['-C', zdaemon_conf] + sys.argv[1:]
+    zdaemon.zdctl.main(args, options=None, cmdclass=ControllerCommands)
\ No newline at end of file

Modified: grokproject/trunk/grokproject/templates.py
===================================================================
--- grokproject/trunk/grokproject/templates.py	2008-12-08 11:21:53 UTC (rev 93774)
+++ grokproject/trunk/grokproject/templates.py	2008-12-08 11:32:43 UTC (rev 93775)
@@ -101,6 +101,8 @@
         else:
             create_buildout_default_file()
 
+        vars['package_directory'] = os.path.join(os.getcwd(),vars['package'])
+        
         return vars
 
     def post(self, command, output_dir, vars):

Modified: grokproject/trunk/tests.py
===================================================================
--- grokproject/trunk/tests.py	2008-12-08 11:21:53 UTC (rev 93774)
+++ grokproject/trunk/tests.py	2008-12-08 11:32:43 UTC (rev 93775)
@@ -78,7 +78,7 @@
     if globs is None:
         globs = globals()
 
-    flags = (doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE) |
+    flags = (doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE | 
              doctest.REPORT_ONLY_FIRST_FAILURE)
 
     if package_dir not in sys.path:



More information about the Checkins mailing list