Mercurial > hg > MakeItSo
comparison makeitso/python.py @ 111:bad70fb08b15
minor syntax corrections
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 14 Jan 2011 18:25:36 -0800 |
parents | 697568ba4a22 |
children | b8d5d2041fe0 |
comparison
equal
deleted
inserted
replaced
110:613e9c19a98c | 111:bad70fb08b15 |
---|---|
32 templates = ['python_package'] | 32 templates = ['python_package'] |
33 vars = [Variable('description'), | 33 vars = [Variable('description'), |
34 Variable('url'), | 34 Variable('url'), |
35 Variable('repo', 'project repository'), | 35 Variable('repo', 'project repository'), |
36 ] | 36 ] |
37 look = True | 37 look = False |
38 | 38 |
39 # things that go in setup.py | 39 # things that go in setup.py |
40 dependencies = {'web.py': ['webob'], | 40 dependencies = {'web.py': ['webob'], |
41 'template.py': ['MakeItSo']} | 41 'template.py': ['MakeItSo']} |
42 console_scripts = {'main.py': '{{project}} = {{project}}.main:main', | 42 console_scripts = {'main.py': '{{project}} = {{project}}.main:main', |
56 # get project from output directory | 56 # get project from output directory |
57 variables['project'] = os.path.basename(output) | 57 variables['project'] = os.path.basename(output) |
58 | 58 |
59 # dependencies | 59 # dependencies |
60 dependencies = set([]) | 60 dependencies = set([]) |
61 for template, dependency in self.dependencies: | 61 for template, dependency in self.dependencies.items(): |
62 dependencies.update(dependency) | 62 dependencies.update(dependency) |
63 dependencies = list(dependencies) | 63 dependencies = list(dependencies) |
64 variables['dependencies'] = dependencies | 64 variables['dependencies'] = dependencies |
65 | 65 |
66 # console_scripts | 66 # console_scripts |
67 console_scripts = [] | 67 console_scripts = [] |
68 for template, console_script in self.console_scripts: | 68 for template, console_script in self.console_scripts.items(): |
69 console_scripts.add(console_script) | 69 console_scripts.append(console_script) |
70 if console_scripts: | 70 if console_scripts: |
71 s = 'setup(' # placeholder string | 71 s = 'setup(' # placeholder string |
72 script_strings = ['[console_scripts]'] | 72 script_strings = ['[console_scripts]'] |
73 for console_script in console_scripts: | 73 for console_script in console_scripts: |
74 template = ContentTemplate(console_script) | 74 template = ContentTemplate(console_script) |