Skip to content

WORKSPACE to MODULE.bazel migration setting default python version #2505

@gfrankliu

Description

@gfrankliu

We are migrating from WORKSPACE to MODULE.bazel. Most of modules are now in MODULE.bazel and very few are still in WORKSPACE.

We have rules_python still in WORKSPACE because some of our internal custom python codes/rules/builds still need more time to update.

We use python version 3.10, eg: in WORKSPACE:

python_register_toolchains(
    name = "python_interpreter",
    python_version = "3.10",
)

We notice an issue where our external dependencies from MODULE.bazel are using python 3.11 instead of our default 3.10.

Since we are still using WORKSPACE and can't set python.toolchain(is_default = True, python_version = "3.10") in our root MODULE.bazel, how can we "tell" those external modules (they are already using MODULE.bazel) to use python 3.10?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Can Close?Will close in 30 days if there is no new activity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions