Attached Documents

patch (177651.patch)

patch (177651.patch)

simply replacing modname with *imported in the join commands will leave single level namespace packages unchanged, but add support for nested namespace packages

download
diff -r bf74411c45cb modutils.py
--- a/modutils.py	Tue Sep 03 10:14:49 2013 +0200
+++ b/modutils.py	Tue Sep 17 10:17:32 2013 -0700
@@ -664,8 +664,8 @@
                 if 'pkgutil' in data and 'extend_path' in data:
                     # extend_path is called, search sys.path for module/packages
                     # of this name see pkgutil.extend_path documentation
-                    path = [join(p, modname) for p in sys.path
-                            if isdir(join(p, modname))]
+                    path = [join(p, *imported) for p in sys.path
+                            if isdir(join(p, *imported))]
                 else:
                     path = [mp_filename]
     return mtype, mp_filename