Skip to content

Commit 6d3c587

Browse files
committed
chore(examples): add Python 3.12 to bzlmod example
1 parent 70f49eb commit 6d3c587

3 files changed

Lines changed: 959 additions & 1 deletion

File tree

examples/bzlmod/MODULE.bazel

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ python.toolchain(
4545
python_version = "3.10",
4646
)
4747

48+
# Adding Python 3.12 version for testing
49+
python.toolchain(
50+
configure_coverage_tool = True,
51+
python_version = "3.12",
52+
)
53+
4854
# Adding the latest Python 3.13 version for testing
4955
python.toolchain(
5056
configure_coverage_tool = True,
@@ -104,7 +110,7 @@ python.single_version_platform_override(
104110
# See the tests folder for various examples on using multiple Python versions.
105111
# The names "python_3_9" and "python_3_10" are autmatically created by the repo
106112
# rules based on the `python_version` arg values.
107-
use_repo(python, "python_3_10", "python_3_13", "python_3_9", "python_versions", "pythons_hub")
113+
use_repo(python, "python_3_10", "python_3_12", "python_3_13", "python_3_9", "python_versions", "pythons_hub")
108114

109115
# EXPERIMENTAL: This is experimental and may be changed or removed without notice
110116
uv = use_extension(
@@ -271,6 +277,17 @@ pip.parse(
271277
"@whl_mods_hub//:wheel.json": "wheel",
272278
},
273279
)
280+
pip.parse(
281+
hub_name = "pip",
282+
python_version = "3.12",
283+
requirements_by_platform = {
284+
"//:requirements_lock_3_12.txt": "linux_*,osx_*",
285+
},
286+
whl_modifications = {
287+
"@whl_mods_hub//:requests.json": "requests",
288+
"@whl_mods_hub//:wheel.json": "wheel",
289+
},
290+
)
274291
pip.parse(
275292
hub_name = "pip",
276293
python_version = "3.13",

0 commit comments

Comments
 (0)