-
Notifications
You must be signed in to change notification settings - Fork 559
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
Allow for requirements files to differ per platform #531
Conversation
82ebb17
to
956e1bf
Compare
956e1bf
to
be0f661
Compare
232a6f3
to
8bf2bf4
Compare
As a common example, we need a compiled requirements file for linux that differs from mac os
539cd04
to
f6c0e46
Compare
The macros are leaky and otherwise you have to read sources to find out about the kwargs Fixes bazelbuild#384
f6c0e46
to
0c811e0
Compare
These are now natively supported by rules_python, cf. bazelbuild/rules_python#531. This means we can now remove our hand-rolled support for per-platform requirements.
I think this is slightly incorrect. Instead of selecting the requirements based on the host, a dependency graph should be created for each target platform, so if I build on a macos host and target a linux platform (maybe for a docker container), I get the right set of requirements. Right now it'd be wrong unless my dependency graph happens to be the same. |
These are now natively supported by rules_python, cf. bazelbuild/rules_python#531. This means we can now remove our hand-rolled support for per-platform requirements.
@UebelAndre the actual install has to happen on the target platform so in a docker container you'd copy in the Linux requirements and use pip_install. There's no Mac outputs of pip_parse that can be useful there. |
Note to self: this PR only updated the pip_parse/incremental=True codepath to use the platform-specific lockfile. |
As a common example, we need a compiled requirements file for linux that differs from mac os
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?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information