diff buildout.cfg @ 205:fd572809cb18

Add local configuration file as arguments to user scripts. * * * Example configuration file.
author Daniele Nicolodi <daniele@grinta.net>
date Wed, 16 Nov 2011 19:10:28 +0100
parents d6b205e8c1f9
children ca6999a5b402
line wrap: on
line diff
--- a/buildout.cfg	Wed Nov 16 19:10:22 2011 +0100
+++ b/buildout.cfg	Wed Nov 16 19:10:28 2011 +0100
@@ -1,9 +1,10 @@
 [buildout]
 include-site-packages = false
-parts = flask wsgi
+parts = install instance wsgi
 develop = src
 
-[flask]
+# install software
+[install]
 recipe = zc.recipe.egg
 eggs = 
   distribute
@@ -15,14 +16,22 @@
   python-dateutil < 2.0
   ltpdarepo
 interpreter = python
+scripts =
+
+# generate scripts pointing to the right configuration file
+[instance]
+recipe = zc.recipe.egg:script
+eggs = ${install:eggs}
 scripts = run admin
+arguments = '${buildout:directory}/etc/ltpdarepo'
 
+# generate wsgi application
 [wsgi]
 recipe = zc.recipe.egg:script
-eggs = ${flask:eggs}
+eggs = ${install:eggs}
 scripts = wsgi
 entry-points =
   wsgi=ltpdarepo:main
 initialization = 
   from ltpdarepo import Application
-  application = Application()
+  application = Application('${buildout:directory}/etc/ltpdarepo')