Skip to content

Commit

Permalink
support root modules using python 3.8 etc
Browse files Browse the repository at this point in the history
  • Loading branch information
shabanzd committed Dec 24, 2023
1 parent f2f1906 commit c9fe4c5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
1 change: 1 addition & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ compile_pip_requirements(
"--strip-extras",
"--upgrade",
],
requirements_txt = "requirements.txt",
tags = ["manual"],
)
32 changes: 26 additions & 6 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit c9fe4c5

Please sign in to comment.