Mercurial > hg > MakeItSo
changeset 108:32893f67f85d
stub out a better python package
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 14 Jan 2011 07:35:19 -0800 (2011-01-14) |
parents | 2142ad247eb6 |
children | 697568ba4a22 |
files | makeitso/makeitso.py makeitso/python.py |
diffstat | 2 files changed, 17 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/makeitso/makeitso.py Fri Jan 14 07:29:23 2011 -0800 +++ b/makeitso/makeitso.py Fri Jan 14 07:35:19 2011 -0800 @@ -513,7 +513,7 @@ # get templates from pkg_resources # (MakeItSo! and [TODO] pastescript templates) -# this should go last to ensure the module is wholly loaded +# this should go last to ensure the module is wholly loaded [?] def get_entry_points(): retval = {} try:
--- a/makeitso/python.py Fri Jan 14 07:29:23 2011 -0800 +++ b/makeitso/python.py Fri Jan 14 07:35:19 2011 -0800 @@ -20,6 +20,7 @@ from cli import MakeItSoCLI from optparse import OptionParser from template import MakeItSoTemplate +from template import Variable class PythonPackageTemplate(MakeItSoTemplate): """ @@ -27,6 +28,10 @@ """ name = 'python-package' templates = ['python_package'] + vars = [Variable('description'), + Variable('url'), + Variable('repo', 'project repository'), + ] look = True # things that go in setup.py @@ -39,6 +44,17 @@ def __init__(self, **kw): MakeItSoTemplate.__init__(self, **kw) + def pre(self, variables, output): + """ + sanitize some variables + """ + + # dependencies + dependencies = [] + + # console_scripts + console_scripts = [] + class PythonPackageCLI(MakeItSoCLI): """ CLI front end for the python package template