gobject-introspection r869 - in trunk: . giscanner



Author: johan
Date: Fri Nov  7 17:41:56 2008
New Revision: 869
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=869&view=rev

Log:
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.



Modified:
   trunk/ChangeLog
   trunk/giscanner/libtoolimporter.py

Modified: trunk/giscanner/libtoolimporter.py
==============================================================================
--- trunk/giscanner/libtoolimporter.py	(original)
+++ trunk/giscanner/libtoolimporter.py	Fri Nov  7 17:41:56 2008
@@ -32,7 +32,7 @@
         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 @@
         # 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)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]