From: Barry Warsaw <barry@python.org>
Date: Thu, 3 Dec 2015 17:24:13 -0500
Subject: Devendorize wheels and use system built wheels.

Patch-Name: debundle.patch
---
 src/pip/_vendor/__init__.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/pip/_vendor/__init__.py b/src/pip/_vendor/__init__.py
index c3db83f..75f2e7d 100644
--- a/src/pip/_vendor/__init__.py
+++ b/src/pip/_vendor/__init__.py
@@ -14,13 +14,16 @@ import sys
 # Downstream redistributors which have debundled our dependencies should also
 # patch this value to be true. This will trigger the additional patching
 # to cause things like "six" to be available as pip.
-DEBUNDLED = False
+DEBUNDLED = True
 
 # By default, look in this directory for a bunch of .whl files which we will
 # add to the beginning of sys.path before attempting to import anything. This
 # is done to support downstream re-distributors like Debian and Fedora who
 # wish to create their own Wheels for our dependencies to aid in debundling.
-WHEEL_DIR = os.path.abspath(os.path.dirname(__file__))
+prefix = getattr(sys, "base_prefix", sys.prefix)
+if prefix.startswith('/usr/lib/pypy'):
+    prefix = '/usr'
+WHEEL_DIR = os.path.abspath(os.path.join(prefix, 'share', 'python-wheels'))
 
 
 # Define a small helper function to alias our vendored modules to the real ones
