{"action":"created","issue":{"url":"https://api.github.com/repos/pypa/setuptools/issues/729","repository_url":"https://api.github.com/repos/pypa/setuptools","labels_url":"https://api.github.com/repos/pypa/setuptools/issues/729/labels{/name}","comments_url":"https://api.github.com/repos/pypa/setuptools/issues/729/comments","events_url":"https://api.github.com/repos/pypa/setuptools/issues/729/events","html_url":"https://github.com/pypa/setuptools/issues/729","id":170309215,"number":729,"title":"Setuptools 25 doesn't handle \"pip install -e\" over the top of existing \"pip install\"","user":{"login":"therefromhere","id":197540,"avatar_url":"https://avatars.githubusercontent.com/u/197540?v=3","gravatar_id":"","url":"https://api.github.com/users/therefromhere","html_url":"https://github.com/therefromhere","followers_url":"https://api.github.com/users/therefromhere/followers","following_url":"https://api.github.com/users/therefromhere/following{/other_user}","gists_url":"https://api.github.com/users/therefromhere/gists{/gist_id}","starred_url":"https://api.github.com/users/therefromhere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/therefromhere/subscriptions","organizations_url":"https://api.github.com/users/therefromhere/orgs","repos_url":"https://api.github.com/users/therefromhere/repos","events_url":"https://api.github.com/users/therefromhere/events{/privacy}","received_events_url":"https://api.github.com/users/therefromhere/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-10T01:37:33Z","updated_at":"2016-08-11T08:56:57Z","closed_at":null,"body":"When editing packages I've previous done \"pip install -e\" without first doing \"pip uninstall\" - this workflow is broken with setuptools 25 - pip freeze reports the wrong (non -e version), and pip uninstall fails with this error: \r\n\r\n```\r\n$ pip uninstall simplejson\r\nException:\r\nTraceback (most recent call last):\r\n  File \"/home/johnc/.virtualenvs/bug/local/lib/python2.7/site-packages/pip/basecommand.py\", line 215, in main\r\n    status = self.run(options, args)\r\n  File \"/home/johnc/.virtualenvs/bug/local/lib/python2.7/site-packages/pip/commands/uninstall.py\", line 76, in run\r\n    requirement_set.uninstall(auto_confirm=options.yes)\r\n  File \"/home/johnc/.virtualenvs/bug/local/lib/python2.7/site-packages/pip/req/req_set.py\", line 336, in uninstall\r\n    req.uninstall(auto_confirm=auto_confirm)\r\n  File \"/home/johnc/.virtualenvs/bug/local/lib/python2.7/site-packages/pip/req/req_install.py\", line 687, in uninstall\r\n    '(at %s)' % (link_pointer, self.name, dist.location)\r\nAssertionError: Egg-link /tmp/simplejson does not match installed location of simplejson (at /home/johnc/.virtualenvs/bug/lib/python2.7/site-packages)\r\n```\r\n\r\n(ignore that I'm using simplejson as an example, I'm getting the same thing with my own packages).\r\n\r\nSteps to reproduce:\r\n\r\n```\r\n$ mkvirtualenv bug\r\n$ pip install setuptools~=25.1.6\r\n$ pip install simplejson\r\n$ pip freeze\r\nsimplejson==3.8.2\r\n$ pip uninstall simplejson\r\n# (uninstall works as expected)\r\n$ pip install simplejson\r\n$ pip freeze\r\nsimplejson==3.8.2\r\n# ok, install/uninstall works as expected\r\n$ git clone https://github.com/simplejson/simplejson.git\r\n$ pip install -e simplejson/\r\nObtaining file:///tmp/simplejson\r\nInstalling collected packages: simplejson\r\n  Running setup.py develop for simplejson\r\nSuccessfully installed simplejson-3.8.2\r\n$ pip freeze\r\nsimplejson==3.8.2\r\n# ??????? expected an editiable mode git hash\r\n$ pip uninstall simplejson\r\nException:\r\nTraceback (most recent call last):\r\n  File \"/home/johnc/.virtualenvs/bug/local/lib/python2.7/site-packages/pip/basecommand.py\", line 215, in main\r\n    status = self.run(options, args)\r\n  File \"/home/johnc/.virtualenvs/bug/local/lib/python2.7/site-packages/pip/commands/uninstall.py\", line 76, in run\r\n    requirement_set.uninstall(auto_confirm=options.yes)\r\n  File \"/home/johnc/.virtualenvs/bug/local/lib/python2.7/site-packages/pip/req/req_set.py\", line 336, in uninstall\r\n    req.uninstall(auto_confirm=auto_confirm)\r\n  File \"/home/johnc/.virtualenvs/bug/local/lib/python2.7/site-packages/pip/req/req_install.py\", line 687, in uninstall\r\n    '(at %s)' % (link_pointer, self.name, dist.location)\r\nAssertionError: Egg-link /tmp/simplejson does not match installed location of simplejson (at /home/johnc/.virtualenvs/bug/lib/python2.7/site-packages)\r\n```\r\n\r\nBy contrast, this works correctly with an earlier version of setuptools.  Expected behaviour:\r\n\r\n```\r\n$ mkvirtualenv notbug\r\n$ pip install setuptools~=24.3.1\r\n$ pip install simplejson\r\n$ pip freeze\r\nsimplejson==3.8.2\r\n$ pip uninstall simplejson\r\n# (uninstall works as expected)\r\n$ pip install simplejson\r\n$ pip freeze\r\nsimplejson==3.8.2\r\n# ok, install/uninstall works as expected\r\n$ git clone https://github.com/simplejson/simplejson.git\r\n$ pip install -e simplejson/\r\nObtaining file:///tmp/simplejson\r\nInstalling collected packages: simplejson\r\n  Running setup.py develop for simplejson\r\nSuccessfully installed simplejson-3.8.2\r\n$ pip freeze\r\n-e git+https://github.com/simplejson/simplejson.git@4b1dab370f8a32aaa3f9140c38645093d3287b82#egg=simplejson\r\n# editable mode as expected\r\n$ pip uninstall simplejson\r\nUninstalling simplejson-3.8.2:\r\n  /home/johnc/.virtualenvs/notbug/lib/python2.7/site-packages/simplejson.egg-link\r\nProceed (y/n)? y\r\n  Successfully uninstalled simplejson-3.8.2\r\n$ pip freeze\r\nsimplejson==3.8.2\r\n# and we're back to the normal package, as expected\r\n```"},"comment":{"url":"https://api.github.com/repos/pypa/setuptools/issues/comments/239106667","html_url":"https://github.com/pypa/setuptools/issues/729#issuecomment-239106667","issue_url":"https://api.github.com/repos/pypa/setuptools/issues/729","id":239106667,"user":{"login":"minrk","id":151929,"avatar_url":"https://avatars.githubusercontent.com/u/151929?v=3","gravatar_id":"","url":"https://api.github.com/users/minrk","html_url":"https://github.com/minrk","followers_url":"https://api.github.com/users/minrk/followers","following_url":"https://api.github.com/users/minrk/following{/other_user}","gists_url":"https://api.github.com/users/minrk/gists{/gist_id}","starred_url":"https://api.github.com/users/minrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minrk/subscriptions","organizations_url":"https://api.github.com/users/minrk/orgs","repos_url":"https://api.github.com/users/minrk/repos","events_url":"https://api.github.com/users/minrk/events{/privacy}","received_events_url":"https://api.github.com/users/minrk/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T08:56:57Z","updated_at":"2016-08-11T08:56:57Z","body":"The uninstall failure should be fixed by https://github.com/pypa/pip/pull/3904"}}
{"actor":{"display_login":"minrk"}}