forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a `stub_shebang` to `py_runtime` to allow users to specify a custom "shebang" expression used by the Python stub script. Motivation is to support environments where `#!/usr/bin/env python` isn't valid (ex: no `/usr/bin/python`, but there's a `/usr/bin/python3`). Closes bazelbuild#8685. ### Guided tour - Added field to `PyRuntimeInfoApi` inc. default value. - Added field to `PyRuntimeInfo` provider inc. tests. - Added field to `py_runtime` Starlark rule inc tests. - Replaced static `#!/usr/bin/env python` in the stub w/ `%shebang%`. - There are a few redundancies w/r/t declaring defaults and documentation. This is because there are a few separate public APIs (ex: `PyRuntimeInfo(...)`, `py_runtime(...)`), and I want to make sure defaults appear in the generated docs. Testing Done: - `bazelisk test src/test/java/com/google/devtools/build/lib/bazel/rules/python/...` `bazelisk test src/test/java/com/google/devtools/build/lib/rules/python/...` Closes bazelbuild#11434. PiperOrigin-RevId: 370622012
- Loading branch information
1 parent
b6f87f1
commit 763dd0c
Showing
9 changed files
with
144 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.