-
-
Notifications
You must be signed in to change notification settings - Fork 597
Parse requirements files for global pip flags. #456
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
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
@@ -2,15 +2,26 @@ | |||
# This file is autogenerated by pip-compile | |||
# To update, run: | |||
# | |||
# pip-compile --output-file=requirements_lock.txt requirements.txt | |||
# pip-compile --generate-hashes --output-file=requirements_lock.txt requirements.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this turned up a small bug, so yay.
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:
.par
files. 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