requirements.txt: option to specify if a specific entry should be installed from source or wheel
See original GitHub issueHello,
we have a pretty long requirements.txt file (170+ entries) and we recently upgraded pip to 9.0.1 which seems (correct me if i’m wrong) to prefer to install the manylinux wheel, if present, over the source tarball when a simple module==version
is specified.
Now, we do need to install a wheel for a specific module but for all the others we prefer to install and build from source (in particular as in some situation we cannot use the wheel at all, cfr https://github.com/numpy/numpy/issues/7570, and there are many of such modules).
is there a way to extend the r.txt entry from module==version
to a format that specify if to install that module from wheel or source? or just tell pip to install all modules from source tarball except for a specific list of modules that need to be installed from wheel? for now we are replacing the problematic entries with hardcoded URLs to the source tarballs on PyPI but it’s ugly, less expressive and fragile.
thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Sorry, I meant to add a link to the docs - https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption--no-binary it should all be in there (and under “Requirements file format” if you want to do it in a requirements file), but basically
The
--no-binary
and--only-binary
flags are probably what you want. They can be specified on the command line or in a requirements file.