summaryrefslogtreecommitdiff
path: root/giscanner/dumper.py
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/dumper.py')
-rw-r--r--giscanner/dumper.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index 3c7220bc..8d255bfc 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -116,8 +116,11 @@ class DumpCompiler(object):
if self._uninst_srcdir is not None:
gdump_path = os.path.join(self._uninst_srcdir, 'girepository', 'gdump.c')
else:
- gdump_path = os.path.join(os.path.join(DATADIR), 'gobject-introspection-1.0',
- 'gdump.c')
+ try:
+ gdump_path = GDUMP_PATH
+ except NameError:
+ gdump_path = os.path.join(os.path.join(DATADIR),
+ 'gobject-introspection-1.0', 'gdump.c')
if not os.path.isfile(gdump_path):
raise SystemExit("Couldn't find %r" % (gdump_path, ))
with open(gdump_path) as gdump_file: