pybind11_bazel icon indicating copy to clipboard operation
pybind11_bazel copied to clipboard

[Question] - How does someone build for multiple versions of python?

Open tenspd137 opened this issue 1 year ago • 0 comments

Using rules_python, a person can add multiple toolchains - for example:

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
    configure_coverage_tool = True,
    python_version = "3.8",
)
python.toolchain(
    configure_coverage_tool = True,
    # Only set when you have mulitple toolchain versions.
    is_default = True,
    python_version = "3.9",
)
python.toolchain(
    configure_coverage_tool = True,
    python_version = "3.10",
)

How would a person switch toolchains when using pybind_extension so that I could build for py3.8 and py3.11?

tenspd137 avatar Aug 20 '24 14:08 tenspd137