Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _distutils_hack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def ensure_local_distutils():

# check that submodules load as expected
core = importlib.import_module('distutils.core')
assert core.__file__ is not None
assert '_distutils' in core.__file__, core.__file__
assert 'setuptools._distutils.log' not in sys.modules

Expand Down
2 changes: 2 additions & 0 deletions setuptools/_imp.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def find_module(module, paths=None):
raise ImportError(f"Can't find {module}")
if not spec.has_location and hasattr(spec, 'submodule_search_locations'):
spec = importlib.util.spec_from_loader('__init__.py', spec.loader)
if not spec:
raise ImportError(f"Can't find {module}")

kind = -1
file = None
Expand Down
Loading