We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9351efd commit b728bdaCopy full SHA for b728bda
src/pip/_internal/locations/_distutils.py
@@ -3,6 +3,17 @@
3
# The following comment should be removed at some point in the future.
4
# mypy: strict-optional=False
5
6
+# If pip's going to use distutils, it should not be using the copy that setuptools
7
+# might have injected into the environment. This is done by removing the injected
8
+# shim, if it's injected.
9
+#
10
+# See https://github.com/pypa/pip/issues/8761 for the original discussion and
11
+# rationale for why this is done within pip.
12
+try:
13
+ __import__("_distutils_hack").remove_shim()
14
+except ImportError:
15
+ pass
16
+
17
import logging
18
import os
19
import sys
0 commit comments