Mercurial > hg > buttercup
annotate 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 |
rev | line source |
---|---|
0
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
1 from paste.script import templates |
6
e6e80bf0476f
update the way checkout works; maybe should move to pip at some point
Jeff Hammel <k0scist@gmail.com>
parents:
0
diff
changeset
|
2 from checkout import sources |
0
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
3 |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
4 var = templates.var |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
5 |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
6 class buttercup(templates.Template): |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
7 _template_dir = 'template' |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
8 summary = 'paste template for creating instances of the buttercup flower website pattern' |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
9 vars = [ |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
10 var('description', 'One-line description of the package'), |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
11 var('author', 'Author name'), |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
12 var('author_email', 'Author email'), |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
13 var('url', 'URL of homepage'), |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
14 ] |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
15 |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
16 def pre(self, command, output_dir, vars): |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
17 """ |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
18 called before the template is applied |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
19 """ |
6
e6e80bf0476f
update the way checkout works; maybe should move to pip at some point
Jeff Hammel <k0scist@gmail.com>
parents:
0
diff
changeset
|
20 src = sources() |
e6e80bf0476f
update the way checkout works; maybe should move to pip at some point
Jeff Hammel <k0scist@gmail.com>
parents:
0
diff
changeset
|
21 vars['install_requires'] = '\n'.join([repr(s[0])+',' |
e6e80bf0476f
update the way checkout works; maybe should move to pip at some point
Jeff Hammel <k0scist@gmail.com>
parents:
0
diff
changeset
|
22 for s in src]) |
0
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
23 |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
24 def post(self, command, output_dir, vars): |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
25 """ |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
26 called after the template is applied |
9661071dac87
initial commit of the buttercup flower; just a stub
k0s <k0scist@gmail.com>
parents:
diff
changeset
|
27 """ |