Mako's TemplateLookup? expect module_directory parameter to be a single item but: http://trac.turbogears.org/browser/trunk/tg/configuration.py#L313 passes the list of templates directories from self.paths resulting in an exception being raised.
The module_directory argument is a single directory where all generated-modules will be created when a template is compiled by mako.
- A simple fix is to use self.pathstemplates?[0] but it might break in some weird ways when there are multiple templates directories
- Even then, this value should be configurable, because the webserver might not have write-access to the templates directory created by the egg-file once deployed
- Also note that when running setup.py bdist_egg if there are any compiled templates hanging aroung in templates/ they will be included in the egg file which might not be desirable
Note: you have to use use_dotted_templatenames = False in your config to hit this bug.