-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
pip install -e does not install setup.py install_requires dependencies #4780
Comments
@leezu We're short on time, so one thing that you could do is write a test that exposes this bug and submit it as a PR. |
@xoviat Sure. What would be the best way for checking if e.g. |
See, for example, here: pip/tests/functional/test_install.py Line 138 in 66c5351
|
The |
Hi @leezu! Could you share the |
Hey @pradyunsg @xoviat . I have investigated this issue a bit further and found it was related to an Which means this bug boils down to:
Furthermore I found renaming the outdated The following
with the following files present in a Not sure if the usage of the wrongly named |
Why is there an outdated |
/note multiple egg-info |
Well this is a project I'm continuously developing. So at some point I added a new requirement to (which it does when working with |
Sorry, I checked again: So just having an outdated So the bug here really boils down to While this is arguably an edge case, I think What do you think? |
Ohkay. Thanks for the clarification. I think this is because you switched layouts after doing an editable install and this is frankly an edge case. Maybe pip should detect it and warn/abort; idk how hard that is and find little motivation to do it myself. A PR for that would definitely be welcome though. :) |
If anyone wants to see this through, they are more than welcome to. What she'll/he'll probably want to do is look into how pip handles editable installs and see if it's possible to detect cases like this. |
Oh, btw, @leezu I think you should just delete the outdated egg-info directory in |
@pradyunsg thanks. In case you're familiar with that part of the codebase (i.e. for the egg-info discovery) it would be great if you can post a link here. |
I'd rather wait on this as it conflicts with a PR that I'm working on. I can fix it later. |
Yes. It's a large patch and so I would like to see it merged soon. But there are two problems:
|
As a note, it's currently impossible to review #4589 as you're regularly adding new commits to it. I'd prefer to wait until it's stabilised and you're happy that the work is complete to your knowledge before trying to review. (I can't promise to be able to do a full review even then, as it's not a part of the code I know well, but I will at least take a look once the code settles down). |
Thanks. Unfortunately, as I noted in the comment above, that will be after the next setuptools release. |
I stumbled into this too today. Using the latest pip 19.0.3 on Python 3.7. I edited the list of
But the new package wasn't installed. :( The package was mentioned in inside The So I think the steps to reproduce are as follows:
▶ pip install -e .
Obtaining file:///Users/peterbe/dev/PYTHON/reproduce-pypa-issue-4780
Collecting click (from name-one==0.0.0)
Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Installing collected packages: click, name-one
Running setup.py develop for name-one
Successfully installed click-7.0 name-one
▶ cat setup.py
from setuptools import setup
setup(name="name-one-v2", install_requires=["click", "requests"])
▶ pip install -e .
Obtaining file:///Users/peterbe/dev/PYTHON/reproduce-pypa-issue-4780
Requirement already satisfied: click in /Users/peterbe/virtualenvs/reproduce-pypa-issue-4780/lib/python3.7/site-packages (from name-one==0.0.0) (7.0)
Installing collected packages: name-one
Found existing installation: name-one 0.0.0
Uninstalling name-one-0.0.0:
Successfully uninstalled name-one-0.0.0
Running setup.py develop for name-one
Successfully installed name-one No (Note; I edited the comment mentioning that the reason why it picks different |
This is still an issue. In my projects, after updating I need either a way to skip dependency validation when searching entry points or a way to ensure the latest |
I wonder if this is the problem I described in #9147 (comment)? If editable requirements are always re-installed, setuptools would have a chance to re-build the egg-info directory when Note that this may or may not be what we want, however, without PEP 517 standardising editable and incremental builds. Running |
@uranusjr is probably right. |
The problem still exists. |
Description:
I have a local package that specifies a number of dependencies via the
install_requires
argument insetup.py
. Installing it withpip install --user -e .
does not install these dependencies, whereaspip install --user .
does.What I've run:
Consider the case where one of the install_requires dependencies (here gitpython) is not present on the system. Below is the output of pip install in both cases. Note that gitpython is only collected and installed in the second case.
The text was updated successfully, but these errors were encountered: