Mercurial > hg > MakeItSo
changeset 114:b8d5d2041fe0
stub out project name -> package name
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 17 Jan 2011 14:38:42 -0800 |
parents | c3b8ce33d3ad |
children | 7dbc3cdadffe |
files | makeitso/makeitso.py makeitso/python.py |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/makeitso/makeitso.py Mon Jan 17 14:32:07 2011 -0800 +++ b/makeitso/makeitso.py Mon Jan 17 14:38:42 2011 -0800 @@ -371,7 +371,7 @@ vars = self.get_variables(**variables) self.check_missing(vars) - # make the output directory + # make the output directory if multiple templates if output and len(self.templates) > 1 and not os.path.exists(output): os.makedirs(output)
--- a/makeitso/python.py Mon Jan 17 14:32:07 2011 -0800 +++ b/makeitso/python.py Mon Jan 17 14:38:42 2011 -0800 @@ -56,6 +56,11 @@ # get project from output directory variables['project'] = os.path.basename(output) + # get package name from project + # XXX could have looser restrictions with transforms + assert variables['project'].isalpha(), 'Project name must be just letters' + variables['package'] = variables['project'].lower() + # dependencies dependencies = set([]) for template, dependency in self.dependencies.items():