comparison makeitso/python.py @ 108:32893f67f85d

stub out a better python package
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 14 Jan 2011 07:35:19 -0800
parents ad5fd3eb6674
children 697568ba4a22
comparison
equal deleted inserted replaced
107:2142ad247eb6 108:32893f67f85d
18 18
19 import sys 19 import sys
20 from cli import MakeItSoCLI 20 from cli import MakeItSoCLI
21 from optparse import OptionParser 21 from optparse import OptionParser
22 from template import MakeItSoTemplate 22 from template import MakeItSoTemplate
23 from template import Variable
23 24
24 class PythonPackageTemplate(MakeItSoTemplate): 25 class PythonPackageTemplate(MakeItSoTemplate):
25 """ 26 """
26 python package template 27 python package template
27 """ 28 """
28 name = 'python-package' 29 name = 'python-package'
29 templates = ['python_package'] 30 templates = ['python_package']
31 vars = [Variable('description'),
32 Variable('url'),
33 Variable('repo', 'project repository'),
34 ]
30 look = True 35 look = True
31 36
32 # things that go in setup.py 37 # things that go in setup.py
33 dependencies = {'web.py': ['webob'], 38 dependencies = {'web.py': ['webob'],
34 'template.py': ['MakeItSo']} 39 'template.py': ['MakeItSo']}
37 } 42 }
38 43
39 def __init__(self, **kw): 44 def __init__(self, **kw):
40 MakeItSoTemplate.__init__(self, **kw) 45 MakeItSoTemplate.__init__(self, **kw)
41 46
47 def pre(self, variables, output):
48 """
49 sanitize some variables
50 """
51
52 # dependencies
53 dependencies = []
54
55 # console_scripts
56 console_scripts = []
57
42 class PythonPackageCLI(MakeItSoCLI): 58 class PythonPackageCLI(MakeItSoCLI):
43 """ 59 """
44 CLI front end for the python package template 60 CLI front end for the python package template
45 """ 61 """
46 62