How do I install extras_require field's packages in test target?
For example:
new extras_require field in setup.py that name is "websupport".In this case, deps = sphinx[websupport] in tox.ini will not bring the expected results because tox get "Sphinx" package from PyPI (not local test target), but "Sphinx" was uploaded at PyPI not have [websupport] extras_requires yet.
Original comment by tjanez
Any progress on this?
My work-around for installing test extra requirements is:
commands =
pip install .[test]
Original comment by @RonnyPfannschmidt
i started taking a look at taking requirements and extra fields into account
Original comment by @shimizukawa
Thanks.
I think it would be nice if tox.ini accept extras field for target package installation.
Original comment by tomprince
You can actually use
commands =
pip install sphinx[websupport]
pip won't get sphinx from pypi, since it will already be installed, but will install the dependencies of the extras.
Original comment by @shimizukawa
@aodag Thanks! It's working!
I'm going to use below setting::
#!ini
commands =
pip install -e .[websupport] -q --log={envlogdir}/pip-extra-install.log
...
And, I hope that tox will provide this functionality.
Original comment by @aodag
You can write the install command at command section.
commands =
pip install -e .[websuport]
nosetests []
Original comment by @shimizukawa
anyone?
AFAICT this works nowadays. Otherwise please reopen.
Yeah:
extras = websupport
Yes, this is supported since Tox 2.4: http://tox.readthedocs.io/en/latest/config.html#confval-extras=MULTI-LINE-LIST
Most helpful comment
Yeah:
extras = websupport