Skip to content
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 foo[*] to install a package and ALL of it's extras #5039

Closed
prometheanfire opened this issue Feb 22, 2018 · 12 comments
Closed

pip install foo[*] to install a package and ALL of it's extras #5039

prometheanfire opened this issue Feb 22, 2018 · 12 comments
Labels
auto-locked Outdated issues that have been locked by automation C: extras Handling optional dependencies type: enhancement Improvements to functionality

Comments

@prometheanfire
Copy link

  • Pip version: 9.0.1
  • Python version: 3.6.3
  • Operating system: Linux

Description:

I'd like pip install foo[*] to install a package and ALL of it's extras.

This would allow those that want to make sure they have all the possible integrations to have them without searching first.

What I've run:

pip install foo[*], it doesn't work

pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'[*]'"
@jcrben
Copy link

jcrben commented Mar 18, 2018

This needs the topic - extras label (like #4824) @pradyunsg

@pradyunsg pradyunsg added type: enhancement Improvements to functionality C: extras Handling optional dependencies labels Mar 18, 2018
@pradyunsg
Copy link
Member

I should have commented -- added.

@cblegare
Copy link

cblegare commented Apr 6, 2018

Installing all of extras is a must!

The feature should probably not break the PEP 508 (final) about dependency specification for Python Software Packages since extras names must comply the same criteria as any package names (* is not a valid package name).

Should it support generic globbing syntax? For instance

Given the foo package with dev_doc, dev_cqa and pdf extras,

should it be possible to pip install foo[dev*] in order to get both dev_doc and dev_cqa extras requirements?

Back reference for a related PBR issue: https://bugs.launchpad.net/pbr/+bug/1672874

@Benjamin-Lee
Copy link

This would be a really helpful feature, especially when there are numerous extras

@dvorapa
Copy link

dvorapa commented Jun 11, 2019

Per PEP 426 this should be pip install foo[all]

@dvorapa
Copy link

dvorapa commented Jun 11, 2019

Duplicate to #4340 btw

@pradyunsg
Copy link
Member

PEP 426 is a "Withdrawn" PEP. It is not an active standard, so does not have any influence on pip's behavior.

@dvorapa
Copy link

dvorapa commented Jun 13, 2019

Of course, that's why this bug might never be fixed

@pfmoore
Copy link
Member

pfmoore commented Jun 13, 2019

Not true. PEP 426 was withdrawn because it was too large and complex, and people couldn't reach agreement. A smaller, more focused, proposal would not have this issue and may be accepted (no promises, of course!).

The problem is that no-one with an interest in the topic has yet volunteered their time to create such a proposal, manage the discussions, take it through to acceptance, and then implement it.

@dvorapa
Copy link

dvorapa commented Jun 13, 2019

Have you seen the reason, why #4340 was closed? The same applies to this. I also don't like this bug is a wontfix, but there are simple workarounds, so it is not a big deal.

@pfmoore
Copy link
Member

pfmoore commented Jun 13, 2019

Yes, it says we won't support a feature like this unless it's backed by a standard. That's why I said "A smaller, more focused, proposal would not have this issue" - there's nothing stopping someone trying to get a standard accepted that just covered the "wildcard extra" part of PEP 426. And if such a proposal were accepted, pip would support it (assuming someone actually wrote the code).

This "bug" (it's actually a feature request) is emphatically not "wontfix" - it's waiting on someone to do the work of implementing it. But the pip developers are unlikely to get to it any time soon, so it'll need community help to get anywhere.

@chrahunt
Copy link
Member

As mentioned above, we aren't going to unilaterally implement a feature like this without it being backed by something like a PEP. Anyone interested in doing that groundwork can start a discussion over in discuss.python.org to start (or the mailing list).

Since there's no immediate action for pip here I will close this. Thanks everyone that contributed to this discussion!

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Dec 24, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Dec 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: extras Handling optional dependencies type: enhancement Improvements to functionality
Projects
None yet
Development

No branches or pull requests

8 participants