[gobject-introspection/mallard-templates] g-ir-doctool: Use template caching
- From: Tomeu Vizoso <tomeuv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/mallard-templates] g-ir-doctool: Use template caching
- Date: Sun, 19 Feb 2012 13:57:19 +0000 (UTC)
commit 152720745751032bd2c21d00dd81239b2f7cb5f4
Author: Tomeu Vizoso <tomeu vizoso collabora com>
Date: Sun Feb 19 14:55:14 2012 +0100
g-ir-doctool: Use template caching
giscanner/mallardwriter.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py
index 2fa3817..b54d587 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':
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]