summaryrefslogtreecommitdiff
path: root/giscanner/xmlwriter.py
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-11-04 13:12:12 -0400
committerColin Walters <walters@verbum.org>2010-11-09 13:56:43 -0500
commitf43f3a722323448dfce514a2b435390fd837ddee (patch)
treeebc3b6ebf329848a92d467b050ca8abf5e2e2daf /giscanner/xmlwriter.py
parent2681a9dcb1182d8b0fc34fbb341d77a0a13c65f2 (diff)
downloadgobject-introspection-f43f3a722323448dfce514a2b435390fd837ddee.tar.gz
Switch to nonrecursive make for core (i.e. not tests/)
This is cleaner and faster, and prepares us better for an incoming import of CMPH.
Diffstat (limited to 'giscanner/xmlwriter.py')
-rwxr-xr-xgiscanner/xmlwriter.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/giscanner/xmlwriter.py b/giscanner/xmlwriter.py
index 6ba1e6ad..a418cc40 100755
--- a/giscanner/xmlwriter.py
+++ b/giscanner/xmlwriter.py
@@ -20,6 +20,8 @@
from __future__ import with_statement
+import os
+
from contextlib import contextmanager
from cStringIO import StringIO
from xml.sax.saxutils import escape, quoteattr
@@ -68,7 +70,10 @@ def collect_attributes(tag_name, attributes, self_indent,
with LibtoolImporter(None, None):
- from giscanner._giscanner import collect_attributes
+ if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ:
+ from _giscanner import collect_attributes
+ else:
+ from giscanner._giscanner import collect_attributes
class XMLWriter(object):