summaryrefslogtreecommitdiff
path: root/giscanner/libtoolimporter.py
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/libtoolimporter.py')
-rw-r--r--giscanner/libtoolimporter.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/giscanner/libtoolimporter.py b/giscanner/libtoolimporter.py
index 84c62f93..20bd0053 100644
--- a/giscanner/libtoolimporter.py
+++ b/giscanner/libtoolimporter.py
@@ -41,10 +41,14 @@ class LibtoolImporter(object):
# should be looked for. See if we can find a ".libs/module.la" relative
# to those directories and failing that look for file
# "some/package/.libs/module.la" relative to sys.path
- module = os.path.join(*modparts)
+ if len(modparts) > 0:
+ modprefix = os.path.join(*modparts)
+ modprefix = os.path.join(modprefix, '.libs')
+ else:
+ modprefix = '.libs'
for path in sys.path:
- full = os.path.join(path, module, '.libs', filename)
+ full = os.path.join(path, modprefix, filename)
if os.path.exists(full):
return cls(name, full)