@@ -30,12 +30,12 @@ bazel_dep(name = "rules_rust", version = "0.54.1")
3030python = use_extension ("@rules_python//python/extensions:python.bzl" , "python" )
3131python .defaults (
3232 # Use python.defaults if you have defined multiple toolchain versions.
33- python_version = "3.9 " ,
33+ python_version = "3.11 " ,
3434 python_version_env = "BAZEL_PYTHON_VERSION" ,
3535)
3636python .toolchain (
3737 configure_coverage_tool = True ,
38- python_version = "3.9 " ,
38+ python_version = "3.10 " ,
3939)
4040
4141# We are also using a second version of Python in this project.
@@ -45,7 +45,7 @@ python.toolchain(
4545# work in progress.
4646python .toolchain (
4747 configure_coverage_tool = True ,
48- python_version = "3.10 " ,
48+ python_version = "3.11 " ,
4949)
5050
5151# One can override the actual toolchain versions that are available, which can be useful
@@ -65,7 +65,7 @@ python.override(
6565 # instead of rules_python's defaulting to the latest available version,
6666 # controls what full version is used when `3.x` is requested.
6767 minor_mapping = {
68- "3.9 " : "3.9 .19" ,
68+ "3.10 " : "3.10 .19" ,
6969 },
7070)
7171
@@ -74,15 +74,15 @@ python.single_version_override(
7474 patch_strip = 1 ,
7575 # The user can specify patches to be applied to all interpreters.
7676 patches = [],
77- python_version = "3.10.2 " ,
77+ python_version = "3.11.14 " ,
7878 sha256 = {
79- "aarch64-apple-darwin" : "1409acd9a506e2d1d3b65c1488db4e40d8f19d09a7df099667c87a506f71c0ef " ,
80- "aarch64-unknown-linux-gnu" : "8f351a8cc348bb45c0f95b8634c8345ec6e749e483384188ad865b7428342703 " ,
81- "x86_64-apple-darwin" : "8146ad4390710ec69b316a5649912df0247d35f4a42e2aa9615bffd87b3e235a " ,
82- "x86_64-pc-windows-msvc" : "a1d9a594cd3103baa24937ad9150c1a389544b4350e859200b3e5c036ac352bd " ,
83- "x86_64-unknown-linux-gnu" : "9b64eca2a94f7aff9409ad70bdaa7fbbf8148692662e764401883957943620dd " ,
79+ "aarch64-apple-darwin" : "01b4e23e35cf3f9aebb8ca1424452da1136070469cd92f44f0cadd825c2cfcc7 " ,
80+ "aarch64-unknown-linux-gnu" : "08141d31f95d86a23f23e4c741b726de0055f12f83200d1d4867b4e8e6e967c5 " ,
81+ "x86_64-apple-darwin" : "941b67f28d10498195af9a0df9e496871b4453ea5cbde0e98861f010c142cdda " ,
82+ "x86_64-pc-windows-msvc" : "24f2d4bcb0e2ac0b088e12fd175a5f857b527b3cff4b12de94b6a9a2a30495e6 " ,
83+ "x86_64-unknown-linux-gnu" : "edd8d11aa538953d12822fab418359a692fd1ee4ca2675579fbf0fa31e3688f1 " ,
8484 },
85- urls = ["20220227 /cpython-{python_version}+20220227 -{platform}-{build}.tar.gz" ],
85+ urls = ["20251028 /cpython-{python_version}+20251028 -{platform}-{build}.tar.gz" ],
8686)
8787
8888# Or a single platform. This can be used in combination with the
@@ -93,16 +93,16 @@ python.single_version_platform_override(
9393 patch_strip = 1 ,
9494 patches = [],
9595 platform = "aarch64-apple-darwin" ,
96- python_version = "3.10.2 " ,
97- sha256 = "1409acd9a506e2d1d3b65c1488db4e40d8f19d09a7df099667c87a506f71c0ef " ,
98- urls = ["20220227 /cpython-{python_version}+20220227 -{platform}-{build}.tar.gz" ],
96+ python_version = "3.11.14 " ,
97+ sha256 = "01b4e23e35cf3f9aebb8ca1424452da1136070469cd92f44f0cadd825c2cfcc7 " ,
98+ urls = ["20251028 /cpython-{python_version}+20251028 -{platform}-{build}.tar.gz" ],
9999)
100100
101101# You only need to load this repositories if you are using multiple Python versions.
102102# See the tests folder for various examples on using multiple Python versions.
103- # The names "python_3_9 " and "python_3_10 " are autmatically created by the repo
103+ # The names "python_3_10 " and "python_3_11 " are automatically created by the repo
104104# rules based on the `python_version` arg values.
105- use_repo (python , "python_3_10" , "python_3_9 " , "python_versions" , "pythons_hub" )
105+ use_repo (python , "python_3_10" , "python_3_11 " , "python_versions" , "pythons_hub" )
106106
107107# EXPERIMENTAL: This is experimental and may be changed or removed without notice
108108uv = use_extension (
@@ -184,45 +184,6 @@ pip.default(
184184# call.
185185# Alternatively, `python_interpreter_target` can be used to directly specify
186186# the Python interpreter to run to resolve dependencies.
187- pip .parse (
188- # We can use `envsubst in the above
189- envsubst = ["PIP_INDEX_URL" ],
190- # Use the bazel downloader to query the simple API for downloading the sources
191- # Note, that we can use envsubst for this value.
192- experimental_index_url = "${PIP_INDEX_URL:-https://pypi.org/simple}" ,
193- # One can also select a particular index for a particular package.
194- # This ensures that the setup is resistant against confusion attacks.
195- # experimental_index_url_overrides = {
196- # "my_package": "https://different-index-url.com",
197- # },
198- # Or you can specify extra indexes like with `pip`:
199- # experimental_extra_index_urls = [
200- # "https://different-index-url.com",
201- # ],
202- experimental_requirement_cycles = {
203- "sphinx" : [
204- "sphinx" ,
205- "sphinxcontrib-qthelp" ,
206- "sphinxcontrib-htmlhelp" ,
207- "sphinxcontrib-devhelp" ,
208- "sphinxcontrib-applehelp" ,
209- "sphinxcontrib-serializinghtml" ,
210- ],
211- },
212- extra_hub_aliases = {
213- "wheel" : ["generated_file" ],
214- },
215- hub_name = "pip" ,
216- python_version = "3.9" ,
217- requirements_lock = "requirements_lock_3_9.txt" ,
218- # These modifications were created above and we
219- # are providing pip.parse with the label of the mod
220- # and the name of the wheel.
221- whl_modifications = {
222- "@whl_mods_hub//:requests.json" : "requests" ,
223- "@whl_mods_hub//:wheel.json" : "wheel" ,
224- },
225- )
226187pip .parse (
227188 experimental_requirement_cycles = {
228189 "sphinx" : [
@@ -242,6 +203,9 @@ pip.parse(
242203 "//:requirements_lock_3_10.txt" : "linux_*,osx_*" ,
243204 "//:requirements_windows_3_10.txt" : "windows_x86_64" ,
244205 },
206+ extra_hub_aliases = {
207+ "wheel" : ["generated_file" ],
208+ },
245209 # These modifications were created above and we
246210 # are providing pip.parse with the label of the mod
247211 # and the name of the wheel.
@@ -254,14 +218,15 @@ pip.parse(
254218 hub_name = "pip" ,
255219 python_version = "3.11" ,
256220 requirements_by_platform = {
257- # Default requirements file for needs to explicitly provide the platforms
258- "//:requirements_lock_3_11.txt" : "linux_*,osx_*" ,
259221 # This API allows one to specify additional platforms that the users
260222 # configure the toolchains for themselves. In this example we add
261223 # `windows_aarch64` to illustrate that `rules_python` won't fail to
262224 # process the value, but it does not mean that this example will work
263225 # on Windows ARM.
264- "//:requirements_windows_3_11.txt" : "windows_x86_64,windows_aarch64" ,
226+ "//:requirements_lock_3_11.txt" : "linux_*,osx_*,windows_x86_64,windows_aarch64" ,
227+ },
228+ extra_hub_aliases = {
229+ "wheel" : ["generated_file" ],
265230 },
266231 # These modifications were created above and we
267232 # are providing pip.parse with the label of the mod
0 commit comments