Does `pip install -c` respect options like `--only-binary` that are listed in the constraints file?

I am interested in distributing a constraints.txt file to use across several services at my organization, which all share a common Docker base image.

Some packages are pre-installed in that image, so I am using the constraints file to make sure that Pip doesn’t accidentally try to install a different version during the container build process.

However, there are other packages where I don’t really care what version is used, but I really want to make sure that Pip doesn’t try to fetch and install a source version of the package. That is, I want to specify --only-binary=foo,bar. If I add this to the constraints.txt file, will it be honored whenever -c constraints.txt is used? Or do options like --only-binary only take effect in --requirements files, but not in --constraints files?

I was able to test this in a Docker container using --only-binary on a package that didn’t have a wheel built for the platform in the container, and yes it does respect at least that option.