comparison makeitso/python.py @ 78:d4184945f8a8

stub out python package creation
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 08 Jan 2011 17:54:58 -0800
parents
children e74baa8e6df4
comparison
equal deleted inserted replaced
77:059b02808efa 78:d4184945f8a8
1 #!/usr/bin/env python
2
3 """
4 python package templates for makeitso
5
6 Several components are included.
7 [TODO] You may use these subtemplates in any combination.
8
9 * README.txt : a README in restructured text
10 * examples : examples for your package
11 * setup.py : setup utility for the full package
12 * ./main.py : CLI handler for your webapp
13 * ./model.py : model of a persisted object
14 * ./template.py : a MakeItSo template for project creation
15 * ./tests : doctest suite for the package
16 * ./web.py : a webob web handler
17 """
18
19 import sys
20 from cli import MakeItSoCLI
21 from optparse import OptionParser
22 from template import MakeItSoTemplate
23
24 class PythonPackage(MakeItSoTemplate):
25 """
26 python package template
27 """
28 name = 'python-package'
29 templates = ['python_package']
30 look = True
31
32 # things that go in setup.py
33 dependencies = {'web.py': ['webob'],
34 'template.py': ['MakeItSo']}
35 console_scripts = {'main.py': '{{project}}.main:main',
36 'template.py': '{{project}}.template:main'
37 }
38
39 def __init__(self, **kw):
40 MakeItSoTemplate.__init__(self, **kw)
41
42 def main(args=sys.argv[:]):
43 usage = '%prog [options]'
44
45
46 if __name__ == '__main__':
47 main()
48