@@ -27,12 +27,12 @@ bazel_dep(name = "rules_rust", version = "0.67.0")
2727python = use_extension ("@rules_python//python/extensions:python.bzl" , "python" )
2828python .defaults (
2929 # Use python.defaults if you have defined multiple toolchain versions.
30- python_version = "3.9 " ,
30+ python_version = "3.11 " ,
3131 python_version_env = "BAZEL_PYTHON_VERSION" ,
3232)
3333python .toolchain (
3434 configure_coverage_tool = True ,
35- python_version = "3.9 " ,
35+ python_version = "3.11 " ,
3636)
3737
3838# We are also using a second version of Python in this project.
@@ -42,63 +42,18 @@ python.toolchain(
4242# work in progress.
4343python .toolchain (
4444 configure_coverage_tool = True ,
45- python_version = "3.10" ,
46- )
47-
48- # One can override the actual toolchain versions that are available, which can be useful
49- # when optimizing what gets downloaded and when.
50- python .override (
51- # NOTE: These are disabled in the example because transitive dependencies
52- # require versions not listed here.
53- # available_python_versions = [
54- # "3.10.9",
55- # "3.9.19",
56- # # The following is used by the `other_module` and we need to include it here
57- # # as well.
58- # "3.11.8",
59- # ],
60- # Also override the `minor_mapping` so that the root module,
61- # instead of rules_python's defaulting to the latest available version,
62- # controls what full version is used when `3.x` is requested.
63- minor_mapping = {
64- "3.9" : "3.9.25" ,
65- },
45+ python_version = "3.12" ,
6646)
67-
68- # Or the sources that the toolchains come from for all platforms
69- python .single_version_override (
70- patch_strip = 1 ,
71- # The user can specify patches to be applied to all interpreters.
72- patches = [],
73- python_version = "3.10.2" ,
74- sha256 = {
75- "aarch64-apple-darwin" : "1409acd9a506e2d1d3b65c1488db4e40d8f19d09a7df099667c87a506f71c0ef" ,
76- "aarch64-unknown-linux-gnu" : "8f351a8cc348bb45c0f95b8634c8345ec6e749e483384188ad865b7428342703" ,
77- "x86_64-apple-darwin" : "8146ad4390710ec69b316a5649912df0247d35f4a42e2aa9615bffd87b3e235a" ,
78- "x86_64-pc-windows-msvc" : "a1d9a594cd3103baa24937ad9150c1a389544b4350e859200b3e5c036ac352bd" ,
79- "x86_64-unknown-linux-gnu" : "9b64eca2a94f7aff9409ad70bdaa7fbbf8148692662e764401883957943620dd" ,
80- },
81- urls = ["20220227/cpython-{python_version}+20220227-{platform}-{build}.tar.gz" ],
82- )
83-
84- # Or a single platform. This can be used in combination with the
85- # `single_version_override` and `single_version_platform_override` will be
86- # applied after `single_version_override`. Any values present in this override
87- # will overwrite the values set by the `single_version_override`
88- python .single_version_platform_override (
89- patch_strip = 1 ,
90- patches = [],
91- platform = "aarch64-apple-darwin" ,
92- python_version = "3.10.2" ,
93- sha256 = "1409acd9a506e2d1d3b65c1488db4e40d8f19d09a7df099667c87a506f71c0ef" ,
94- urls = ["20220227/cpython-{python_version}+20220227-{platform}-{build}.tar.gz" ],
47+ python .toolchain (
48+ configure_coverage_tool = True ,
49+ python_version = "3.13" ,
9550)
9651
9752# You only need to load this repositories if you are using multiple Python versions.
9853# See the tests folder for various examples on using multiple Python versions.
99- # The names "python_3_9" and "python_3_10 " are autmatically created by the repo
54+ # The names "python_3_11", "python_3_12" and "python_3_13 " are automatically created by the repo
10055# rules based on the `python_version` arg values.
101- use_repo (python , "python_3_10 " , "python_3_9 " , "python_versions" , "pythons_hub" )
56+ use_repo (python , "python_3_11 " , "python_3_12" , "python_3_13 " , "python_versions" , "pythons_hub" )
10257
10358# EXPERIMENTAL: This is experimental and may be changed or removed without notice
10459uv = use_extension (
@@ -207,8 +162,8 @@ pip.parse(
207162 "--index-url=${PIP_INDEX_URL:-https://pypi.org/simple}" ,
208163 ],
209164 hub_name = "pip" ,
210- python_version = "3.9 " ,
211- requirements_lock = "requirements_lock_3_9 .txt" ,
165+ python_version = "3.11 " ,
166+ requirements_lock = "requirements_lock_3_11 .txt" ,
212167 # These modifications were created above and we
213168 # are providing pip.parse with the label of the mod
214169 # and the name of the wheel.
@@ -229,12 +184,12 @@ pip.parse(
229184 ],
230185 },
231186 hub_name = "pip" ,
232- python_version = "3.10 " ,
187+ python_version = "3.12 " ,
233188 # The requirements files for each platform that we want to support.
234189 requirements_by_platform = {
235190 # Default requirements file for needs to explicitly provide the platforms
236- "//:requirements_lock_3_10 .txt" : "linux_*,osx_*" ,
237- "//:requirements_windows_3_10 .txt" : "windows_x86_64" ,
191+ "//:requirements_lock_3_12 .txt" : "linux_*,osx_*" ,
192+ "//:requirements_windows_3_12 .txt" : "windows_x86_64" ,
238193 },
239194 # These modifications were created above and we
240195 # are providing pip.parse with the label of the mod
@@ -246,16 +201,16 @@ pip.parse(
246201)
247202pip .parse (
248203 hub_name = "pip" ,
249- python_version = "3.11 " ,
204+ python_version = "3.13 " ,
250205 requirements_by_platform = {
251206 # Default requirements file for needs to explicitly provide the platforms
252- "//:requirements_lock_3_11 .txt" : "linux_*,osx_*" ,
207+ "//:requirements_lock_3_13 .txt" : "linux_*,osx_*" ,
253208 # This API allows one to specify additional platforms that the users
254209 # configure the toolchains for themselves. In this example we add
255210 # `windows_aarch64` to illustrate that `rules_python` won't fail to
256211 # process the value, but it does not mean that this example will work
257212 # on Windows ARM.
258- "//:requirements_windows_3_11 .txt" : "windows_x86_64,windows_aarch64" ,
213+ "//:requirements_windows_3_13 .txt" : "windows_x86_64,windows_aarch64" ,
259214 },
260215 # These modifications were created above and we
261216 # are providing pip.parse with the label of the mod
0 commit comments