-
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 download --no-deps --no-binary does some unwanted build steps #7995
Comments
The issue title seems a bit inaccurate. The build process is necessary to discover dependencies, so it is not unwanted for |
Thanks for the interest and correction. |
From a UX standpoint, it may seem confusing that pip responds to the I agree with the technical constraints behind computing dependencies here, and I don't really want to get into the behavioral expectations a user might have (i.e. whether you would actually expect to get dependencies along with the main package in the first place) -- I only want to add that I, too, have found this confusing in the past. I often need to only acquire the bits behind a package and there is no clear way to accomplish this. |
I don't know if I would want the 'build' output totally hidden but I could see it being useful to add a tier for the dependency collection. At which point Is there any case where it is useful to collect dependencies when |
No, pip is just not smart enough to not do it. The “problem” here is that |
I'm pretty sure there's an issue already for this and I think that's marked blocked on #988. Apologies if that turns out to be not-correct, but I'm fairly certain that we'd end up fixing this as part of fixing #988 (which is ongoing work). /cc @pfmoore and I see that @uranusjr has commented already. |
I would hope so, but we might need more than the new resolver to fix this. To avoid showing the message, the resolver needs to not prepare the candidate. That’s not too hard, but then how do we ensure the candidate gets prepared for install? I’m under the impression that the current code base relies on the resolver to do that. |
I would have thought that (if it's not already happening that way) the new resolver code will only prepare what it needs (to get dependencies - we originally eagerly prepared to get version/name, but we've changed that now). That means that the candidates that get selected for install, particularly when 1 Have we implemented |
#8387 contains some disussion on this as well. A discussion also too place in Discourse, which led to a PEP submission that may improve the situation. |
This comment has been minimized.
This comment has been minimized.
I'm gonna consolidate this into #1884 by expanding that from just setup.py-based builds to covering this whole topic -- this is basically that but for pyproject.toml based builds. |
Environment
Description
I would like to download an sdist from PyPI without any other activity.
pip download --no-deps --no-binary :all: cryptography
ends up 'installing' build dependencies and more. The example below is done with thecryptography
package because it is faster than my real case ofPyQt5
.Expected behavior
Pip should exclusively download the sdist.
How to Reproduce
Run
pip download --no-deps --no-binary :all: cryptography
.Output
altendky@p1:~/blue$ ll total 8 drwxrwxr-x 2 altendky altendky 4096 Apr 7 10:04 ./ drwxr-xr-x 55 altendky altendky 4096 Apr 7 09:59 ../
altendky@p1:~/blue$ ll total 520 drwxrwxr-x 3 altendky altendky 4096 Apr 7 10:05 ./ drwxr-xr-x 55 altendky altendky 4096 Apr 7 09:59 ../ -rw-rw-r-- 1 altendky altendky 517211 Apr 7 10:05 cryptography-2.9.tar.gz drwxrwxr-x 4 altendky altendky 4096 Apr 7 10:04 venv/
altendky@p1:~/blue$ venv/bin/pip --version pip 20.0.2 from /home/altendky/blue/venv/lib/python3.8/site-packages/pip (python 3.8)
altendky@p1:~/blue$ venv/bin/python --version --version Python 3.8.2 (default, Mar 7 2020, 20:18:24) [GCC 9.2.1 20191008]
The text was updated successfully, but these errors were encountered: