It 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.
It looks like it works:
from setuptools import setup
setup(name='testpkg',
version='1.0',
description='test package',
author='tester',
author_email='[email protected]',
extras_require={'toto': 'wheel[signatures]'},
url='',
packages=['testpkg'],
)
pip install .[toto]
did install keyring (cf https://bitbucket.org/pypa/wheel/src/1cb7374c9ea4d5c82992f1d9b24cf7168ca87707/setup.py?at=default&fileviewer=file-view-default#setup.py-42)
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
That's going to be due to a different bug. I don't have the number offhand but we don't really have an actual deep resolver atm :(
Sent from my iPhone
On Oct 1, 2015, at 5:31 AM, Piotr Dobrogost [email protected] wrote:
Thank you for taking a look.
It seems that the difference is due to lack of install_requires=['wheel'] in your test. After adding it the extras do not get installed.
—
Reply to this email directly or view it on GitHub.
I'm well aware pip does not have a resolver (issue #988) but as @rbtcollins wrote in issue #3046 this is special case solvable by "simply" merging each requirement with all it's extras anywhere in the dependency graph. As I see it, in my case there's both Kotti
(from install_requires
) and Kotti[testing]
(from extras_require
) but only the former is taken into consideration when calculating list of requirements to install.
I think this and #3189 are pure dupes of each other. I'd like to work on the other one since I've already got a full coverage description there :).
Duplicate of #3189
Why is this not supported by python setup.py
?
Most helpful comment
Why is this not supported by
python setup.py
?