Restructured loading of compiled __init__ files.

This commit is contained in:
Dave Halter
2015-04-28 02:30:32 +02:00
parent 836fcd6ea0
commit cbd3a8a59a

View File

@@ -318,6 +318,10 @@ def dotted_from_fs_path(fs_path, sys_path=None):
if sys_path is None:
sys_path = get_sys_path()
if os.path.basename(fs_path).startswith('__init__.'):
# We are calculating the path. __init__ files are not interesting.
fs_path = os.path.dirname(fs_path)
# prefer
# - UNIX
# /path/to/pythonX.Y/lib-dynload