Support tests_require
See original GitHub issueI use setuptools ‘tests_require’ to specify dependencies required for testing my package.
tests_require - http://pythonhosted.org/distribute/setuptools.html#new-and-changed-setup-keywords
I have begun using wheel packaging
http://wheel.readthedocs.org/en/latest/
and building a directory of the wheels for my current packages and all their dependencies.
pip wheel --wheel-dir=/tmp/wheelhouse .
However I would like to also build wheels for all the packages listed in any of the packages tests_require.
Obviously I could explicitly specify the requirements in a duplicate test_requirements.txt file:
pip wheel --wheel-dir=/mnt/wheelhouse -r test-requirements.txt
But then I am duplicating the dependencies in both the test requirements file and in the tests_require list. I could read the test requirements file into the tests_require but that seems to be misusing requirements files which to my understanding are intended to allow users to be in control of specifying an environment of packages that are known to work together.
Requirements files - http://www.pip-installer.org/en/latest/cookbook.html
Issue Analytics
- State:
- Created 10 years ago
- Reactions:3
- Comments:7 (4 by maintainers)
Top GitHub Comments
A better way to specify test requirements is to use { ‘extras_require’ : { ‘test’: [‘requirement1’, ‘requirement2’] } }
Then the dedicated test_requires can ask for yourpackage[test] or you can just pip install yourpackage[test] when you want.
This is not currently possible to do since setuptools doesn’t exist this information. The extras mechanism that was indicated above is the correct way to handle this on pip.