Mercurial > hg > MakeItSo
comparison makeitso/python.py @ 168:54f42aa651bc
fix single module interpolation
| author | Jeff Hammel <jhammel@mozilla.com> |
|---|---|
| date | Thu, 31 Oct 2013 17:38:39 -0700 |
| parents | 0c95d7f25d9b |
| children | c3f719824948 |
comparison
equal
deleted
inserted
replaced
| 167:f6474c7dfb39 | 168:54f42aa651bc |
|---|---|
| 17 """ | 17 """ |
| 18 | 18 |
| 19 # TODO: console_scripts for all of these | 19 # TODO: console_scripts for all of these |
| 20 | 20 |
| 21 import os | 21 import os |
| 22 import shutil | |
| 22 import sys | 23 import sys |
| 23 from cli import MakeItSoCLI | 24 from cli import MakeItSoCLI |
| 24 from makeitso import ContentTemplate | 25 from makeitso import ContentTemplate |
| 25 from optparse import OptionParser | 26 from optparse import OptionParser |
| 26 from template import MakeItSoTemplate | 27 from template import MakeItSoTemplate |
| 55 look = False | 56 look = False |
| 56 | 57 |
| 57 def pre(self, variables, output): | 58 def pre(self, variables, output): |
| 58 variables['project'] = variables['module'] = variables['main'] = self.output2name(output) | 59 variables['project'] = variables['module'] = variables['main'] = self.output2name(output) |
| 59 | 60 |
| 61 def post(self, variables, output): | |
| 62 shutil.move(os.path.join(output, '{{main.py}}'), | |
| 63 os.path.join(output, variables['main'])) | |
| 60 | 64 |
| 61 class PythonPackageTemplate(PythonTemplate): | 65 class PythonPackageTemplate(PythonTemplate): |
| 62 """ | 66 """ |
| 63 python package template | 67 python package template |
| 64 """ | 68 """ |
