Closed mering closed 7 months ago
I don't think pybind11_bazel can do better right now, but @rickeylev has (much) greater Bazel knowledge than I do, so there might be some way to get this working ahead of initial support for rules_python. :)
I think this may be a critical bug for those on multiple platforms:
"@@rules_python~0.27.1~python~python_3_11_x86_64-unknown-linux-gnu//:bin/python3"
Will not register for non-linux
and non-x86_64
platforms.
Ping, @rickeylev!
As of the v2.11.1.bzl.2 release, pybind11_bazel uses rules_python. Please refer to the latter's documentation for details about registering toolchains.
How can I specify a specific Python toolchain with Bzlmod.
I have the following toolchain:
It works to specify the toolchain via resolved repo name but this requires hard-coding all versions:
I tried using the following alias target but it got not resolved correctly:
My guess would be that the following is not resolved correctly: https://github.com/pybind/pybind11_bazel/blob/23926b00e2b2eb2fc46b17e587cf0c0cfd2f2c4b/python_configure.bzl#L159-L160
Maybe this is because generated files are not supported by
repository_ctx.path()
: