Does pip support extras in extras_require?
See original GitHub issueIt looks like using extras in requirements used in extras_require is not supported. For instance having this in setup.py:
extras_require={
'testing': 'Kotti[testing]',
'development': 'Kotti[development]',
},
and running pip install -e .[testing] results in Kotti being installed but not any of Kotti’s requirements listed in testing extra.
Setuptools’ documentation in section Declaring “Extras” (optional features with their own dependencies) mentions using extras in install_requires but does not mention using it in extras_requires.
I’m using current develop which includes fix from https://github.com/pypa/pip/pull/2785.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Does pip handle extras_requires from setuptools/distribute ...
It appears that pip install .[develop] (without the -e ) does not work, and you need to use an editable installation if you...
Read more >Adding a default extra_require environment - Packaging
We just need to allow users to create an environment called None. For now the following will fail: from setuptools import setup extras_require...
Read more >A Better Practice for Managing Many extras_require ...
In this article, I introduce a simple yet effective solution to manage optional dependencies via extras_require in Python. This method is ...
Read more >Recursive Optional Dependencies in Python - Hynek Schlawack
... optional dependencies that are needed for HTTP/2 support. You can specify more than one extra at once: pip install httpx[http2,cli] will ...
Read more >extras-require - PyPI
extras_require can be installed from PyPI or Anaconda. To install with pip: $ python -m pip install extras_require. To install with conda:.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Why is this not supported by
python setup.py?Thank you for taking a look.
It seems that the difference is due to lack of
install_requires=['wheel']in your test (I did not include this as I didn’t think it might be related). After adding it the extras do not get installed.I suspect the problem could be the same as in issue #3046