summaryrefslogtreecommitdiff
path: root/giscanner/libtoolimporter.py
diff options
context:
space:
mode:
authorJohan Dahlin <jdahlin@async.com.br>2008-11-07 17:41:56 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-11-07 17:41:56 +0000
commit01220e7856552971ad10c3ba6b2e04415120c454 (patch)
tree0e2df5ffd542a8b4271d25b751939c814c5571ee /giscanner/libtoolimporter.py
parent5a7d8861b040749ff43ffcb8b9421b8df2f073fb (diff)
downloadgobject-introspection-01220e7856552971ad10c3ba6b2e04415120c454.tar.gz
Clear up some confusion about the second argument to find_module, it's
2008-11-07 Johan Dahlin <jdahlin@async.com.br> * giscanner/libtoolimporter.py (LibtoolImporter.find_module): Clear up some confusion about the second argument to find_module, it's actually the packages __path__ attribute which we can safely ignore for our purposes. svn path=/trunk/; revision=869
Diffstat (limited to 'giscanner/libtoolimporter.py')
-rw-r--r--giscanner/libtoolimporter.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/giscanner/libtoolimporter.py b/giscanner/libtoolimporter.py
index 789d7b80..968b9353 100644
--- a/giscanner/libtoolimporter.py
+++ b/giscanner/libtoolimporter.py
@@ -32,7 +32,7 @@ class LibtoolImporter(object):
self.path = path
@classmethod
- def find_module(cls, name, relpath=None):
+ def find_module(cls, name, packagepath=None):
modparts = name.split('.')
filename = modparts.pop() + '.la'
@@ -40,14 +40,9 @@ 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
- if relpath is None:
- paths = relpath
- module = ''
- else:
- paths = sys.path
- module = os.path.join(*modparts)
+ module = os.path.join(*modparts)
- for path in paths:
+ for path in sys.path:
full = os.path.join(path, module, '.libs', filename)
if os.path.exists(full):
return cls(name, full)