comparison makeitso/python.py @ 178:d6ef91d49609

hopefully do away with some extra variable reentry
author Jeff Hammel <k0scist@gmail.com>
date Sun, 02 Mar 2014 18:45:20 -0800
parents c3f719824948
children 5bd1c50c6f61
comparison
equal deleted inserted replaced
177:c3f719824948 178:d6ef91d49609
120 if console_scripts: 120 if console_scripts:
121 s = 'setup(' # placeholder string 121 s = 'setup(' # placeholder string
122 script_strings = ['[console_scripts]'] 122 script_strings = ['[console_scripts]']
123 for console_script in console_scripts: 123 for console_script in console_scripts:
124 template = ContentTemplate(console_script) 124 template = ContentTemplate(console_script)
125 output = template.substitute(project=variables['project']) 125 output = template.substitute(project=variables['project'],
126 package=variables['package'],
127 main=variables['main'])
126 script_strings.append(output) 128 script_strings.append(output)
127 variables['console_scripts'] = '\n'.join([' ' * len(s) + i 129 variables['console_scripts'] = '\n'.join([' ' * len(s) + i
128 for i in script_strings]) 130 for i in script_strings])
129 else: 131 else:
130 variables['console_scripts'] = '' 132 variables['console_scripts'] = ''