bazelbuild/bazel

Don't require a system-installed Python interpreter for bootstrapping

brandjon opened this issue · 5 comments

Forked from discussion in #7947. On windows, we can have the native launcher take on the responsibilities of the stub script, in particular extracting the runfiles. This means it can use any Python runtime to launch the user code, including a runtime in runfiles.

We should also consider creating a native launcher for non-Windows platforms to do the same, so we don't need the #!/usr/bin/env python shebang.

Finally, we can consider merging the zip file into the launch to create a self-extracting native executable.

We should also consider creating a native launcher for non-Windows platforms to do the same, so we don't need the #!/usr/bin/env python shebang.

Can you write up a proposal for goals and rough ideas?

Just a though about the python (or a future native) wrapper: it would be much nicer if bazel run/test would invoke the correct interpreter directly, passing PYTHONPATH as an env var instead of using execv to replace the wrapper process.

I would like to be able to easily wrap --run_under=... to run tools like cProfile or pdb without having to hack wrapper scripts to inject them.

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team (@bazelbuild/triage). Thanks!