Your SlideShare is downloading. ×

Templating In Buildout

1,075

Published on

Templating, macro and shell commands in buildout.

Templating, macro and shell commands in buildout.

Published in: Technology, Self Improvement
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,075
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Templating in buildouts Cherepanyak Volodymyr © Quintagroup, 2009
  • 2. Templating in buildout
    • amplecode.recipe.template (Jinja2)
    • z3c.recipe.filetemplate (string.Template)
    • iw.recipe.template (Cheetah Templates)
    • inquant.recipe.textfile
    • collective.recipe.template
    • z3c.recipe.template
  • 3. buildout macro zc.recipe.macro ... [buildout] ... parts = instance0 instance1 ... versions = versions ... ... [instance-macro] ... application = application ... zope.conf = ... <eventlog> ... <logfile> ... path /var/log/myapp/$${:__name__}-z3.log ... </logfile> ... </eventlog> ... <product-config zc.z3monitor> ... port $${:monitor-port} ... </product-config>
  • 4. buildout macro ... [instance0] ... recipe = zc.recipe.macro ... result-recipe = zc.recipe.macro:test ... macro = instance-macro ... address = 8080 ... monitor-port = 8089 ... ... [instance1] ... recipe = zc.recipe.macro ... result-recipe = zc.recipe.macro:test ... macro = instance-macro ... address = 9080 ... monitor-port = 9089
  • 5. Shell commands in buildout plone.recipe.command (os.system) [chown] recipe = plone.recipe.command command = chown -R ${instance:effective-user}:${instance:effective-user} ${buildout:directory} update-command = ${chown:command}
  • 6. Shell commands in buildout
    • iw.recipe.cmd
    • adds python scripting
    • cp.recipe.cmd
    • pushes shell commands into single script
  • 7. References google ;) http://pypi.python.org http://svn.zope.org http://dev.plone.org/collective/browser/buildout https://ingeniweb.svn.sourceforge.net/svnroot/ingeniweb

×