summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMin RK <benjaminrk@gmail.com>2016-08-11 10:42:46 +0200
committerMin RK <benjaminrk@gmail.com>2016-08-26 12:06:08 +0200
commit3577f80c9b951c155b113a0a865f7076a2cfeb08 (patch)
tree206f2e4052260db700e5635518cb808f71e7601c
parenta25c26c6edb098fb0c893201c2c07c13f3944a3e (diff)
downloadpip-3577f80c9b951c155b113a0a865f7076a2cfeb08.tar.gz
don't assume egg-link corresponds to dist to uninstall
by checking if develop_egg_link exists prior to checking dist_info, the `.egg-link` file is attempted to be uninstalled, without checking whether it corresponds to the dist scheduled to be uninstalled. Lowering the priority of the egg-link uninstall fixes this.
-rw-r--r--pip/req/req_install.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pip/req/req_install.py b/pip/req/req_install.py
index d68f7ada5..05bbfa174 100644
--- a/pip/req/req_install.py
+++ b/pip/req/req_install.py
@@ -679,6 +679,10 @@ class InstallRequirement(object):
'easy-install.pth')
paths_to_remove.add_pth(easy_install_pth, './' + easy_install_egg)
+ elif egg_info_exists and dist.egg_info.endswith('.dist-info'):
+ for path in pip.wheel.uninstallation_paths(dist):
+ paths_to_remove.add(path)
+
elif develop_egg_link:
# develop egg
with open(develop_egg_link, 'r') as fh:
@@ -692,10 +696,6 @@ class InstallRequirement(object):
'easy-install.pth')
paths_to_remove.add_pth(easy_install_pth, dist.location)
- elif egg_info_exists and dist.egg_info.endswith('.dist-info'):
- for path in pip.wheel.uninstallation_paths(dist):
- paths_to_remove.add(path)
-
else:
logger.debug(
'Not sure how to uninstall: %s - Check: %s',