Remove `--python_path` flag
This had to be broken out of #7375 because it turns out python_path is used on windows to communicate the location of the Python interpreter even when it's not otherwise available on the PATH at execution time.
We can possibly switch this bit of client-server communication to use a hidden flag in place of --python_path. Alternatively (and probably preferably), we can replace this logic with a repo rule that detects the host platform's Python interpreter, and feed that into the Python toolchain. Another option is to deprecate this bit of niceness and instead require that the interpreter either be available on PATH at execution time or else have its path embedded into an appropriate py_runtime of a toolchain definition.
Blocked in part on #7844.
Looks like there's some background on the windows workaround in #3717.
Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so.
This is more important to address as we are moving out flags to rules_python: https://github.com/bazelbuild/bazel/pull/27792
Otherwise, it means rules_python has to be always fetched on Windows.
@rickeylev Do you have any idea how to remove the need of --python_path on Windows? I guess the biggest problem we need to figure out is how to make sure py_binary can find the python binary for the launcher?
Currently, I'm having some test failures in https://github.com/bazelbuild/bazel/pull/27924
OK, this is probably not an issue in rules_python, found a fix for the failure windows tests while removing the use of --python_path. https://github.com/bazelbuild/bazel/pull/27924