From c9fe4c5a89f65922486860429a03b80fef3d667d Mon Sep 17 00:00:00 2001 From: Ziad Date: Sun, 24 Dec 2023 22:09:13 +0200 Subject: [PATCH 1/2] support root modules using python 3.8 etc --- BUILD | 1 + MODULE.bazel | 32 ++++++++++++++++++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/BUILD b/BUILD index 770b2c6..0cdecf8 100644 --- a/BUILD +++ b/BUILD @@ -18,5 +18,6 @@ compile_pip_requirements( "--strip-extras", "--upgrade", ], + requirements_txt = "requirements.txt", tags = ["manual"], ) diff --git a/MODULE.bazel b/MODULE.bazel index 2c25f26..f51f9fc 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -23,12 +23,32 @@ use_repo( register_toolchains("//appimage:all") +PYTHON_VERSIONS = [ + "3.8", + "3.9", + "3.10", + "3.11", +] + python = use_extension("@rules_python//python/extensions:python.bzl", "python") -python.toolchain(python_version = "3.11") + +[ + python.toolchain( + is_default = python_version == PYTHON_VERSIONS[-1], + python_version = python_version, + ) + for python_version in PYTHON_VERSIONS +] + pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") -pip.parse( - hub_name = "rules_appimage_py_deps", - python_version = "3.11", - requirements_lock = "//:requirements.txt", -) + +[ + pip.parse( + hub_name = "rules_appimage_py_deps", + python_version = python_version, + requirements_lock = "//:requirements.txt", + ) + for python_version in PYTHON_VERSIONS +] + use_repo(pip, "rules_appimage_py_deps") From 22cd1da5ef0ca411b1a11d8d501c2ebfaace09eb Mon Sep 17 00:00:00 2001 From: Ziad Date: Mon, 25 Dec 2023 12:21:36 +0100 Subject: [PATCH 2/2] Update BUILD --- BUILD | 1 - 1 file changed, 1 deletion(-) diff --git a/BUILD b/BUILD index 0cdecf8..770b2c6 100644 --- a/BUILD +++ b/BUILD @@ -18,6 +18,5 @@ compile_pip_requirements( "--strip-extras", "--upgrade", ], - requirements_txt = "requirements.txt", tags = ["manual"], )