While working on a virtualenv for developing a python package, I use to issue a "pip wheel ." to generate all wheel archives needed for the package. I start using conditional dependencies by listing them in the setuptools extras_require parameter. Is it possible to generage the wheel archives of a specific conditional dependency?
Something like: pip wheel ".[conditional_feature]" is not supported. (at least on python-2.7) Note that I can install these dependencies in the virtualenv with: pip install -e ".[conditional_feature]"
See my answer and this script that helps you doing exactly that with a different approach using multiple requirements files and a condition to use one or the other.
Note also that with the latest version (2017) of the pypa trio (pip,setuptools, wheel) you can now use conditional requirements directly. Here is an example with extra_requires that install various versions of lxml on different OSes:
extras_require={
':platform_system == "Windows"': ['lxml == 3.6.0'],
':platform_system == "Linux"': ['lxml == 3.6.4'],
':platform_system == "Darwin"': ['lxml == 3.6.4'],
},
You can do a lot more than this of course with even more complex expressions.