diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2012-02-19 14:55:14 +0100 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2012-02-19 14:55:14 +0100 |
commit | 152720745751032bd2c21d00dd81239b2f7cb5f4 (patch) | |
tree | 3ba6ba561aa0a5e9c683b82f7ed7e7bc5ef6dacd /giscanner | |
parent | f0e534a9ecb9a7b33985b59ccf5378029b24e2ce (diff) | |
download | gobject-introspection-152720745751032bd2c21d00dd81239b2f7cb5f4.tar.gz |
g-ir-doctool: Use template caching
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/mallardwriter.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py index 2fa38176..b54d587b 100644 --- a/giscanner/mallardwriter.py +++ b/giscanner/mallardwriter.py @@ -23,6 +23,7 @@ import os import re +import tempfile from xml.sax import saxutils from mako.template import Template @@ -162,7 +163,9 @@ class MallardWriter(object): template_dir = 'unimplemented' file_name = os.path.join(template_dir, template_name) - template = Template(filename=file_name, output_encoding='utf-8') + file_name = os.path.abspath(file_name) + template = Template(filename=file_name, output_encoding='utf-8', + module_directory=tempfile.gettempdir()) if self._language == 'C': formatter = MallardFormatterC elif self._language == 'Python': |