This makes it possible to run pip with venv python that doesn't have access to the system-site-packages to import distlib. It's a bit weird that distlib installs into the pip dir, but that seems like the easiest change to make this work. Fixes #27113
13 lines
606 B
Diff
13 lines
606 B
Diff
--- pip-21.1.1/src/pip/_vendor/__init__.py.orig 2021-05-23 16:02:55.105064300 +0530
|
|
+++ pip-21.1.1/src/pip/_vendor/__init__.py 2021-05-23 16:10:22.105230100 +0530
|
|
@@ -46,6 +46,9 @@
|
|
base, head = vendored_name.rsplit(".", 1)
|
|
setattr(sys.modules[base], head, sys.modules[modulename])
|
|
|
|
+# Use system distlib rather than the one vendored.
|
|
+sys.path[:] = glob.glob(os.path.join(WHEEL_DIR, "*.whl")) + sys.path
|
|
+vendored("distlib")
|
|
|
|
# If we're operating in a debundled setup, then we want to go ahead and trigger
|
|
# the aliasing of our vendored libraries as well as looking for wheels to add
|