<#18562 Consider pip build options in requirements...
# github-notifications
c
#18562 Consider pip build options in requirements.txt Issue created by marijncv Is your feature request related to a problem? Please describe. Some python packages make use of build options to customize the way the package will be installed. An example of this is imagecodecs which can be installed without 3rd-party dependencies like this:
pip install imagecodecs --global-option="build_ext" --global-option="--lite"
. Currently in pants, providing pip options like this does not seem to be possible. The docs also state that these options are ignored (for now). Describe the solution you'd like Ideally, pants should pick up the pip build options from the lines in a
requirements.txt
file when creating the lockfile and when installing the package. Example requirements.txt:
Copy code
imagecodecs==2023.1.23 --global-option="build_ext" --global-option="--lite"
Pillow<10.0.0,>=9
...
Describe alternatives you've considered There is a way to configure pip build options via an environment variable, but I did not find a way to make them apply only for this specific package and not for any other packages. pantsbuild/pants