Open jsirois opened 6 months ago
See #2342 where Pants uses the requirements file Pip option pass-through when pex3 lock create
ing lock files and then gets bit when trying to update those lock files. The --only-binary
/ --no-binary
pass-throughs used to create a lock vanish in the serialized lock - there is no record of them at all, and since pex3 lock update
does not accept requirement files, the pass-through back door is not available when performing an update and the --only-binary
/ --no-binary
restriction is lost.
The full reference for options that can be passed in requirements files: https://pip.pypa.io/en/stable/reference/requirements-file-format/#per-requirement-options
Current requirements file parsing skips over Pip options and just allows them to flow through to Pip. This is fine for cases where we only care about Pip's resolve results, but falls down in the lock file creation case, where we write down some of these options to be preserved when the lock file is updated later.