perf: migrate bash launcher to hermetic-build#1045
Conversation
|
491171d to
dbccde5
Compare
| # Make wheel-declared console scripts reachable via `subprocess.run("name", ...)`. | ||
| _venv_bin = os.path.join(sys.prefix, "bin") | ||
| if _venv_bin not in os.environ.get("PATH", "").split(os.pathsep): | ||
| os.environ["PATH"] = _venv_bin + os.pathsep + os.environ.get("PATH", "") |
There was a problem hiding this comment.
Does anyone know of a better way of doing this? Should it be opt-in?
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dbccde5e29
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,5 +1,12 @@ | |||
| """quasi-public types.""" | |||
|
|
|||
| PyExecutableInfo = provider( | |||
There was a problem hiding this comment.
This replaces the __PEX_PY_BINARY_ENTRYPOINT__ we were inserting into the shell script.
I don't know the history behind py_pex_binary or if this is the ideal solution. @thesayyn?
| PyExecutableInfo = provider( | ||
| doc = "Provider emitted by `py_venv_exec` carrying launcher-level metadata that downstream consumers can't infer from the binary itself.", | ||
| fields = { | ||
| "entrypoint_rlocation": "str — runfiles path of the `main` Python file the launcher exec's. Read by `py_pex_binary` to set the pex entrypoint without scraping the launcher.", |
There was a problem hiding this comment.
should be a File instead of a str. downstream consumers can decide what they want to do with it.


Changes are visible to end-users: yes
Use https://github.com/hermeticbuild/hermetic-launcher to launch the python toolchain instead of depending on a shell wrapper.
Test plan