Parse requirements files for global pip flags.#456
Merged
Conversation
Then add them to the extra_pip_args array. Pass a copy of each cleaned up line (comments and line-breaks removed) to each whl_library repo verbatim. Then link based requirements or requirement lines with requirement specific flags work. Due to the pip restriction on using requirement specific flags in requirements.txt files only, write each requirement line to a temp file before invoking pip in each whl_library repo. Fixes #438 #447
13 tasks
alexeagle
approved these changes
Apr 15, 2021
| # To update, run: | ||
| # | ||
| # pip-compile --output-file=requirements_lock.txt requirements.txt | ||
| # pip-compile --generate-hashes --output-file=requirements_lock.txt requirements.txt |
Contributor
There was a problem hiding this comment.
I am surprised there isn't a second place in this example where the generate-hashes argument was supplied.
If the point of the PR is to allow users to give pip flags, shouldn't there be a source file where they do so? (as opposed to this generated file?)
Contributor
Author
There was a problem hiding this comment.
I would think of this file, which happens to be generated, as the only input from the user. The fact that there is also a requirements.txt in this directory is because we are using pip-compile to create the lock file. I can modify this file to add some pip arguments for the sake of demonstration.
Contributor
Author
There was a problem hiding this comment.
Adding this turned up a small bug, so yay.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up to #432
Parse requirements files for global pip flags, then add them to the extra_pip_args array.
Pass a copy of each cleaned up line (comments and line-breaks removed) to
each whl_library repo verbatim. Then link based requirements or requirement
lines with requirement specific flags work.
Due to the pip restriction on using requirement specific flags in
requirements.txt files only, write each requirement line to a temp file
before invoking pip in each whl_library repo.
Fixes #438
Fixes #447
PR Checklist
Please check if your PR fulfills the following requirements:
.parfiles. See CONTRIBUTING.md for infoPR Type
What kind of change does this PR introduce?
What is the current behavior?
All flags and url requirements in pip_parse are ignored.
Issue Number: N/A
What is the new behavior?
Global pip flags requirement specific pip flags, and url style requirement specs are respected in pip_parse
Does this PR introduce a breaking change?
Other information