Skip to content

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

Open
@tenspd137

Description

@tenspd137

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions