# HG changeset patch # User Jeff Hammel # Date 1375224223 25200 # Node ID 1a419ebe0fe53a8899ab34c54f937d047e5c86f2 # Parent a5d058957734b48f5846a1d129e3c078ec74bc40 sdad diff -r a5d058957734 -r 1a419ebe0fe5 makeitso/python.py --- a/makeitso/python.py Tue Jul 30 15:36:24 2013 -0700 +++ b/makeitso/python.py Tue Jul 30 15:43:43 2013 -0700 @@ -36,11 +36,13 @@ def output2name(self, path): return os.path.splitext(os.path.basename(path.rstrip(os.path.sep)))[0] + class PythonScriptTemplate(PythonTemplate): """template for a single python script""" templates = [('python_package', '{{package}}', '{{main}}.py')] vars = [Variable('description')] + class PythonModuleTemplate(PythonTemplate): """single module python package""" # TODO: this should use the same files as PythonPackageTemplate @@ -50,7 +52,8 @@ look = False def pre(self, variables, output): - variables['module'] = variables['main'] = self.output2name(output) + variables['project'] = variables['module'] = variables['main'] = self.output2name(output) + class PythonPackageTemplate(PythonTemplate): """