From 3577f80c9b951c155b113a0a865f7076a2cfeb08 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 11 Aug 2016 10:42:46 +0200 Subject: 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. --- pip/req/req_install.py | 8 ++++---- 1 file 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', -- cgit v1.2.1