view buttercup/__init__.py @ 6:e6e80bf0476f

update the way checkout works; maybe should move to pip at some point
author Jeff Hammel <k0scist@gmail.com>
date Mon, 29 Mar 2010 11:57:48 -0700
parents 9661071dac87
children 86c3c0d4d434
line wrap: on
line source

from paste.script import templates
from checkout import sources

var = templates.var

class buttercup(templates.Template):
    _template_dir = 'template'
    summary = 'paste template for creating instances of the buttercup flower website pattern'
    vars = [
        var('description', 'One-line description of the package'),
        var('author', 'Author name'),
        var('author_email', 'Author email'),
        var('url', 'URL of homepage'),
        ] 

    def pre(self, command, output_dir, vars):
        """
        called before the template is applied
        """
        src = sources()
        vars['install_requires'] = '\n'.join([repr(s[0])+','
                                              for s in src])

    def post(self, command, output_dir, vars):
        """
        called after the template is applied
        """