Mercurial > hg > MakeItSo
diff makeitso/python.py @ 155:386a44a52139
moving to a thing with script template
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 05 Jun 2013 13:38:23 -0700 |
parents | e70421c50d0a |
children | cfd4f1e91090 |
line wrap: on
line diff
--- a/makeitso/python.py Sat Dec 01 19:35:46 2012 -0800 +++ b/makeitso/python.py Wed Jun 05 13:38:23 2013 -0700 @@ -27,10 +27,18 @@ class PythonTemplate(MakeItSoTemplate): """abstract base class for python-type templates""" + +class PythonScriptTemplate(PythonTemplate): + """template for a single python script""" + templates = [os.path.join('python_package', '{{package}}', 'main.py')] + + class PythonModuleTemplate(PythonTemplate): """single module python package""" + # TODO: this should use the same files as PythonPackageTemplate templates = ['python_module'] + class PythonPackageTemplate(PythonTemplate): """ python package template @@ -76,7 +84,7 @@ dependencies.update(dependency) dependencies = list(dependencies) variables['dependencies'] = dependencies - + # console_scripts console_scripts = [] for template, console_script in self.console_scripts.items(): @@ -105,4 +113,4 @@ cli(*args) if __name__ == '__main__': - main() + main()