diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2022-02-15 19:20:52 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2022-02-15 19:20:52 -0500 |
| commit | 2b40489be6a33053754b08cad785fe8be580994e (patch) | |
| tree | 4d86fcd91e491d86dc37dd92834e690159b84a40 /_distutils_hack/__init__.py | |
| parent | 7311f837636e12bd58248f9d2d71ce13f8ea6fc5 (diff) | |
| download | python-setuptools-git-2b40489be6a33053754b08cad785fe8be580994e.tar.gz | |
When loading distutils from the vendored copy, rewrite __name__ to ensure consistent importing from inside and out. Fixes #3035.
Diffstat (limited to '_distutils_hack/__init__.py')
| -rw-r--r-- | _distutils_hack/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index c6f7de60..605a6edc 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -57,6 +57,7 @@ def ensure_local_distutils(): # check that submodules load as expected core = importlib.import_module('distutils.core') assert '_distutils' in core.__file__, core.__file__ + assert 'setuptools._distutils.log' not in sys.modules def do_override(): @@ -112,6 +113,7 @@ class DistutilsMetaFinder: class DistutilsLoader(importlib.abc.Loader): def create_module(self, spec): + mod.__name__ = 'distutils' return mod def exec_module(self, module): |
