
jim at zope
Aug 27, 2009, 6:40 AM
Post #2 of 6
(784 views)
Permalink
|
|
Re: zc.buildout, substitution and templating
[In reply to]
|
|
On Thu, Aug 27, 2009 at 9:14 AM, Encolpe Degoute<encolpe.degoute [at] free> wrote: > Hello, > > These last days I was using collective.recipe.template and > gocept.recipe.env. > > The second one just update options with os.environ. > Unix shell having their own substitution methods then '${' appearing in > the .installed.cfg. It just blows if you try to rerun 'bin/buildout. What error did you get? > As zc.buildout is using something near string.template I patched > gocept.recipe.env to replace '$' by '$$' and collective.recipe.template > to replace '$$' by '$'. > As _sub method in builout just split text around '$$' and join it again > with '$$' we need to make the replacement with the result of this method. > > Is it the good way to deal with escaping data ? > Or is this a bug of zc.buildout ? That's a good question. Buildout substitutions are always of the form ${section:option}, so conceivably buildout could ignore substitutions without a colon. I suspect it would be better to always require escaping and make sure buildout provides a documented way to do so. OTOH, I can see the convenience of not requiring escaping variable substitutions wo colons. Jim -- Jim Fulton _______________________________________________ Zope-Dev maillist - Zope-Dev [at] zope http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
|