Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make pip install -e uninstall existing versions #3898

Merged
merged 9 commits into from
Aug 18, 2016

Conversation

xavfernandez
Copy link
Member

Based on #1552

msabramo and others added 9 commits February 10, 2014 13:56
by adding an additional call to `requirement.check_if_exists()` to
RequirementSet.install

Fixes pypaGH-1548
Add a comment that says something like "when installing editables,
nothing pre-existing should ever satisfy".

Addresses @qwcode's comment at
pypa#1552 (comment)
But only when pip has collected the editable package's metadata.

closes pypa#1548
@xavfernandez xavfernandez added this to the 8.2 milestone Aug 5, 2016
@xavfernandez xavfernandez changed the title Check if exists editable Make pip install -e uninstall existing versions Aug 5, 2016
@xavfernandez
Copy link
Member Author

cc @msabramo @qwcode

@minrk
Copy link
Contributor

minrk commented Aug 9, 2016

I'm really excited about this. The more pip install -e behaves like pip install, the better. This plus setuptools 25's change to stop editing sys.path is going to improve my life a whole bunch.

I can verify that this is working for me, especially since prior editable installs have caused a problem where uninstall fails, due to an inverted priority:

(test-pip) benjaminrk[17:58]~/dev/py/pip (65a82a2) $ pip install .
Processing /Users/benjaminrk/dev/py/pip
Installing collected packages: pip
  Found existing installation: pip 8.1.2
Exception:
Traceback (most recent call last):
  File "/Users/benjaminrk/env/test-pip/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Users/benjaminrk/env/test-pip/lib/python3.5/site-packages/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "/Users/benjaminrk/env/test-pip/lib/python3.5/site-packages/pip/req/req_set.py", line 736, in install
    requirement.uninstall(auto_confirm=True)
  File "/Users/benjaminrk/env/test-pip/lib/python3.5/site-packages/pip/req/req_install.py", line 687, in uninstall
    '(at %s)' % (link_pointer, self.name, dist.location)
AssertionError: Egg-link /Users/benjaminrk/dev/py/pip does not match installed location of pip (at /Users/benjaminrk/env/test-pip/lib/python3.5/site-packages)

@sigmavirus24
Copy link
Member

This looks fine to me. I'm not sure the behaviour is exactly what I'd expect but shrug.

@xavfernandez xavfernandez merged commit 3417fac into pypa:master Aug 18, 2016
@xavfernandez xavfernandez deleted the check_if_exists_editable branch August 18, 2016 15:08
@fungi
Copy link
Contributor

fungi commented Sep 1, 2016

The OpenStack community would love to see this (or something) merged to solve the editable installs problem introduced by setuptools 25.0.0. We only just now discovered that projects using tox with usedevelop=True in our CI have not actually been testing the source code we expected if something else has already dragged in a packaged version of them as a transitive dependency.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants