-
Notifications
You must be signed in to change notification settings - Fork 541
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
feat(py_runtime): Allow py_runtime
to take an executable target as the interpreter
#1621
feat(py_runtime): Allow py_runtime
to take an executable target as the interpreter
#1621
Conversation
Thanks for the review, I've also added a bare bones unit test |
d593067
to
c60b21f
Compare
7cf394f
to
c60b21f
Compare
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.
This looks pretty good; almost there. Most is just cosmetic changes. Only real potential bug is the order of checks for the single-file vs executable cases.
I got a bit of time now, so I think I can resolve most of the requested changes and push them into this PR.
* Wrap changelog text * Make comment about allow_files more descriptive * Improve doc about interpreter attribute behavior * use helper_target()
* add tests for binaries with multiple and single outputs * switch to custom rule instead of using sh_binary * fix bug where single-output binary rules wouldn't have runfiles merged in. * puts the tests in a more alphabetical location
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 think this is in good shape and can be merged.
The only thing I can think to add is an integration test to verify that using an sh_binary as described actually works, but that can be done in a separate PR if necessary.
Awesome, thank you for getting this over the line! |
This PR allows
py_runtime
to accept an executable (e.g.sh_binary
).This makes it easier to customize the interpreter binary used, as it allows
intercepting invocation of the interpreter. For example, it can be used to
change how the interpreter searches for dynamic libraries.
Related to #1612