diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | modutils.py | 4 |
2 files changed, 5 insertions, 3 deletions
@@ -2,11 +2,13 @@ ChangeLog for logilab.common ============================ -- - * modutils: + * modutils: * don't propagate IOError when package's __init__.py file doesn't exist (#174606) * ensure file is closed, may cause pb depending on the interpreter, eg pypy) (#180876) + * fix support for `extend_path` based nested namespace packages ; + Report and patch by John Johnson (#177651) * fix some cases of failing python3 install on windows platform / cross compilation (#180836) diff --git a/modutils.py b/modutils.py index e339a70..2756841 100644 --- a/modutils.py +++ b/modutils.py @@ -667,8 +667,8 @@ def _module_file(modpath, path=None): 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 |