summaryrefslogtreecommitdiff
path: root/giscanner/sourcescanner.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/sourcescanner.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/sourcescanner.py')
-rw-r--r--giscanner/sourcescanner.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py
index 20339e47..e3968e32 100644
--- a/giscanner/sourcescanner.py
+++ b/giscanner/sourcescanner.py
@@ -26,6 +26,12 @@ import tempfile
from .libtoolimporter import LibtoolImporter
from .message import Position
+with LibtoolImporter(None, None):
+ if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ:
+ from _giscanner import SourceScanner as CSourceScanner
+ else:
+ from giscanner._giscanner import SourceScanner as CSourceScanner
+
(CSYMBOL_TYPE_INVALID,
CSYMBOL_TYPE_ELLIPSIS,
CSYMBOL_TYPE_CONST,
@@ -211,9 +217,7 @@ class SourceSymbol(object):
class SourceScanner(object):
def __init__(self):
- with LibtoolImporter(None, None):
- from giscanner._giscanner import SourceScanner
- self._scanner = SourceScanner()
+ self._scanner = CSourceScanner()
self._filenames = []
self._cpp_options = []