Commit dcc71f77 authored by Jason R. Coombs's avatar Jason R. Coombs

Rename _distutils_importer to _distutils_hack, as it supplies more than just an importer.

parent 1e53a2c1
......@@ -15,7 +15,7 @@ collect_ignore = [
'tests/manual_test.py',
'setuptools/tests/mod_with_constant.py',
'setuptools/_distutils',
'_distutils_importer',
'_distutils_hack',
]
......
......@@ -95,7 +95,7 @@ class install_with_pth(install):
def initialize_options(self):
install.initialize_options(self)
self.extra_path = (
'distutils-precedence', 'import _distutils_importer.install')
'distutils-precedence', 'import _distutils_hack.install')
def finalize_options(self):
install.finalize_options(self)
......
......@@ -5,7 +5,7 @@ import functools
import os
import re
import _distutils_importer.override # noqa: F401
import _distutils_hack.override # noqa: F401
import distutils.core
from distutils.errors import DistutilsOptionError
......
......@@ -200,7 +200,7 @@ _MODULES_TO_HIDE = {
'distutils',
'pkg_resources',
'Cython',
'_distutils_importer',
'_distutils_hack',
}
......@@ -232,9 +232,9 @@ def hide_setuptools():
necessary to avoid issues such as #315 where setuptools upgrading itself
would fail to find a function declared in the metadata.
"""
_distutils_importer = sys.modules.get('_distutils_importer', None)
if _distutils_importer is not None:
_distutils_importer.remove_shim()
_distutils_hack = sys.modules.get('_distutils_hack', None)
if _distutils_hack is not None:
_distutils_hack.remove_shim()
modules = filter(_needs_hiding, sys.modules)
_clear_modules(modules)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment