Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

patch dist_in_site_packages for user_site tests

  • Loading branch information...
commit 4c8ac16ec07398f4312ef93b29a7043685166ead 1 parent 7746051
@qwcode authored
Showing with 4 additions and 6 deletions.
  1. +2 −4 pip/
  2. +2 −2 tests/
6 pip/
@@ -8,8 +8,6 @@
import tempfile
import zipfile
-import pip
from distutils.util import change_root
from pip.locations import bin_py, running_under_virtualenv
from pip.exceptions import (InstallationError, UninstallationError,
@@ -19,7 +17,7 @@
from pip.log import logger
from pip.util import display_path, rmtree
from pip.util import ask, ask_path_exists, backup_dir
-from pip.util import is_installable_dir, is_local, dist_is_local, dist_in_usersite
+from pip.util import is_installable_dir, is_local, dist_is_local, dist_in_usersite, dist_in_site_packages
from pip.util import renames, normalize_path, egg_link_path
from pip.util import make_path_relative
from pip.util import call_subprocess
@@ -694,7 +692,7 @@ def check_if_exists(self):
if self.use_user_site:
if dist_in_usersite(existing_dist):
self.conflicts_with = existing_dist
- elif running_under_virtualenv() and pip.util.dist_in_site_packages(existing_dist):
+ elif running_under_virtualenv() and dist_in_site_packages(existing_dist):
raise InstallationError("Will not install to the user site because it will lack sys.path precedence to %s in %s"
%(existing_dist.project_name, existing_dist.location))
4 tests/
@@ -12,8 +12,8 @@
patch_dist_in_site_packages = """
def dist_in_site_packages(dist):
return False
- import pip
- pip.util.dist_in_site_packages=dist_in_site_packages
+ from pip import req
+ req.dist_in_site_packages=dist_in_site_packages
Please sign in to comment.
Something went wrong with that request. Please try again.