Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify CLI options with Pip options when requirements files are parsed. #2345

Open
jsirois opened this issue Jan 25, 2024 · 2 comments
Open

Comments

@jsirois
Copy link
Member

jsirois commented Jan 25, 2024

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.

@jsirois
Copy link
Member Author

jsirois commented Jan 25, 2024

See #2342 where Pants uses the requirements file Pip option pass-through when pex3 lock createing 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.

@jsirois
Copy link
Member Author

jsirois commented Jan 25, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

1 participant