mirror of https://github.com/pypa/pip
[issue 1548] Make pip install -e uninstall existing versions
by adding an additional call to `requirement.check_if_exists()` to RequirementSet.install Fixes GH-1548
This commit is contained in:
parent
ffcd44c716
commit
41dbd9711e
|
@ -876,6 +876,10 @@ exec(compile(
|
|||
return True
|
||||
else:
|
||||
self.satisfied_by = pkg_resources.get_distribution(self.req)
|
||||
|
||||
if self.editable and self.satisfied_by:
|
||||
self.conflicts_with = self.satisfied_by
|
||||
return True
|
||||
except pkg_resources.DistributionNotFound:
|
||||
return False
|
||||
except pkg_resources.VersionConflict:
|
||||
|
|
|
@ -625,6 +625,8 @@ class RequirementSet(object):
|
|||
# distribute wasn't installed, so nothing to do
|
||||
pass
|
||||
|
||||
requirement.check_if_exists()
|
||||
|
||||
if requirement.conflicts_with:
|
||||
logger.notify('Found existing installation: %s'
|
||||
% requirement.conflicts_with)
|
||||
|
|
Loading…
Reference in New Issue