-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Command to know what file would be downloaded for a requirement #6430
Comments
I don't think it's entirely possible (and I think the initial snippet is wrong) once we get a real version solver in place. It's entirely possible that However, the hypothetical |
Good point, I did not think of that. How about defining this as “outputting all possible links for this specification” instead? This don’t need to guarentee what would be actually installed (or anything at all), only list the links found. My use case is exactly to feed the output to a resolver, but I don’t want to re-implement all the configuration and edge cases in pip. |
In #6740 I made a similar request: What's the problem this feature will solve? Describe the solution you'd like
Alternative Solutions
Additional context |
FYI, I posted PR #6910, which makes progress towards this. |
Also, FWIW, re: the original issue, I like the idea of a |
FYI PR #7016, which was just posted, relates to this. |
Neither |
Is this a subset of the broader "do a dry-run, and tell me what you would've done" ALA #53? |
Yes if we provide good enough dry-run logging (I want to parse the filename in a script). |
I think so, yes. |
What's the problem this feature will solve?
I want to know what version (and potentially ahich artifact) would be downloaded/installed when I
pip install
a package. Currently I do something likepip download --no-deps --dest %TMP%
and read the output, but that can take a long time if the package is large (e.g. numpy).Describe the solution you'd like
Something like
pip find numpy
to only execute the finding part, but instead of downloading (and inspecting) the package, print the link that would be downloaded instead:Alternative Solutions
My current approach is described above. Alternative design includes
pip install --dry-run
, but that does not feel right because it implies dependency resolution (which requires the package to be downloaded).An alternative output is to list all applicable links, instead of only the best match.
Additional context
A command that automatically download packages (to a temporary location) and produce a requirements.txt could be useful as well, but I can write a script using existing pip commands easily enough, so pip don’t really need to provide that functionality.
The text was updated successfully, but these errors were encountered: