-
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
how do I tell what extras are available? #2718
Comments
Today the only way to know is to examine the metadata. This is static for wheels, and dynamic for everything else. I think it could be reasonable for pip to have a query mode to answer questions like this. |
pkg_resources has an easy way to get at this information. Shown is how you would look at metadata for ipython on sys.path, but it is also possible to load metadata from any directory e.g. an uninstalled package:
In wheels, there is a *.dist-info directory with METADATA. It has one Provides-Extra: line for each extra:
In *.egg-info, there is a requires.txt. This package has a [test] extra.
|
@dholth - there are not enough scare quotes in the world to put around “easy” in that first sentence :) |
@dholth I was assuming the request was for uninstalled packages :) |
Closing this, use pypi/warehouse#1855 instead. |
What about packages that aren't on warehouse? e.g. direct url references etc... |
@rbtcollins I'm not sure what you'd want pip to do in those cases? A command that downloads it and just prints out what extras are available? |
exactly |
Ok, we can keep this, but I'm going to fold it into #484. |
I know I can
pip install requests[security]
, but how do I know it's called "security" (other than reading the docs) and how do I know there aren't other things I also want to install? Can pip do this for me? Is there a tool outside of pip I should be using?The text was updated successfully, but these errors were encountered: