🐞 bug report
Affected Rule
python/private/local_runtime_repo.bzl
Is this a regression?
No
Description
When using a local toolchain on Windows as per https://rules-python.readthedocs.io/en/latest/toolchains.html#local-toolchain,
the define_local_runtime_toolchain.impl.interpreter_path is not escaping the backward slashes, making bazel fail with invalid escape sequence.
If I set:
local_runtime_repo(
name = "local_python3",
on_failure = "fail",
interpreter_path = "python"
# or interpreter_path = "C:\\path\\to\\python.exe"
)
I get a
# Generated by python/private/local_runtime_repo.bzl
load()
define_local_runtime_toolchain_impl(
interpreter_path = "C:\path\to\python.exe" # expected: either "\\" or "/"
)
🔬 Minimal Reproduction
TODO
🔥 Exception or Error
TODO
🌍 Your Environment
Operating System:
Output of bazel version:
Rules_python version:
Anything else relevant?