-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support autodetecting toolchain on windows #7844
Comments
This replaces the stub default Python toolchain with one that actually locates the target platform's Python interpreter at runtime. Try it out with bazel build //some_py_binary --experimental_use_python_toolchains and note that, unlike before (#4815), the correct Python interpreter gets invoked by default regardless of whether you specify `--python_version=PY2` or `--python_version=PY3`. This toolchain is only intended as a last resort, if the user doesn't define and register a better toolchain (that satisfies the target platform constraints). Work toward #7375 and #4815. Follow-up work needed to add a test (#7843) and windows support (#7844). RELNOTES: None PiperOrigin-RevId: 240417315
Just realized that by adding an autodetecting toolchain that doesn't work for windows, I'm breaking the default behavior on windows for when |
Also make sure to update site/docs/windows.md. |
… --python_path This works around the fact that the autodetecting toolchain doesn't run under Windows (#7844). We'll have to add a Windows toolchain in the future, and then remove --python_path (and also address the EnsurePythonPathOption behavior in blaze_util_windows.cc). RELNOTES: None PiperOrigin-RevId: 241051815
An alternative to implementing this toolchain for windows would be to just have a repo rule create a toolchain for the host system. This might help eliminate that |
See here for more discussion relating to detecting the interpreter at workspace evaluation time versus execution time. Looks like workspace time is preferred. |
Now that we have both a Python 2 and 3 interpreter on our CI machines (bazelbuild/continuous-integration#578), we can turn on these version tests for Windows. Since there's no autodetecting toolchain for Windows yet (#7844) we define an explicit toolchain. Fixes #8411. RELNOTES: None PiperOrigin-RevId: 250562174
Now that we have both a Python 2 and 3 interpreter on our CI machines (bazelbuild/continuous-integration#578), we can turn on these version tests for Windows. Since there's no autodetecting toolchain for Windows yet (bazelbuild#7844) we define an explicit toolchain. Fixes bazelbuild#8411. RELNOTES: None PiperOrigin-RevId: 250562174
Now that we have both a Python 2 and 3 interpreter on our CI machines (bazelbuild/continuous-integration#578), we can turn on these version tests for Windows. Since there's no autodetecting toolchain for Windows yet (bazelbuild#7844) we define an explicit toolchain. Fixes bazelbuild#8411. RELNOTES: None PiperOrigin-RevId: 250562174
|
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 ( |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team ( |
We're currently supporting this on linux. Windows support requires rewriting the pywrapper shell script in .bat, and is also blocked on bazelbuild/continuous-integration#578.
The text was updated successfully, but these errors were encountered: