@@ -169,10 +169,13 @@ pip.default(
169169 env = {
170170 "platform_version" : "0" ,
171171 },
172+ # Windows ARM64 support has been added only on 3.11 and above, hence, constrain
173+ # the availability of the platform for those python versions.
174+ marker = "python_version >= '3.11'" ,
172175 os_name = "windows" ,
173176 platform = "windows_aarch64" ,
174177 whl_abi_tags = [], # default to all ABIs
175- whl_platform_tags = ["win_amd64 " ],
178+ whl_platform_tags = ["win_arm64 " ],
176179)
177180
178181# To fetch pip dependencies, use pip.parse. We can pass in various options,
@@ -206,14 +209,6 @@ pip.parse(
206209 "sphinxcontrib-serializinghtml" ,
207210 ],
208211 },
209- # You can use one of the values below to specify the target platform
210- # to generate the dependency graph for.
211- experimental_target_platforms = [
212- # Specifying the target platforms explicitly
213- "cp39_linux_x86_64" ,
214- "cp39_linux_*" ,
215- "cp39_*" ,
216- ],
217212 extra_hub_aliases = {
218213 "wheel" : ["generated_file" ],
219214 },
@@ -239,30 +234,34 @@ pip.parse(
239234 "sphinxcontrib-serializinghtml" ,
240235 ],
241236 },
242- # You can use one of the values below to specify the target platform
243- # to generate the dependency graph for.
244- experimental_target_platforms = [
245- # Using host python version
246- "linux_*" ,
247- "osx_*" ,
248- "windows_*" ,
249- # Or specifying an exact platform
250- "linux_x86_64" ,
251- # Or the following to get the `host` platform only
252- "host" ,
253- ],
254237 hub_name = "pip" ,
255238 python_version = "3.10" ,
256239 # The requirements files for each platform that we want to support.
257240 requirements_by_platform = {
258241 # Default requirements file for needs to explicitly provide the platforms
259242 "//:requirements_lock_3_10.txt" : "linux_*,osx_*" ,
243+ "//:requirements_windows_3_10.txt" : "windows_x86_64" ,
244+ },
245+ # These modifications were created above and we
246+ # are providing pip.parse with the label of the mod
247+ # and the name of the wheel.
248+ whl_modifications = {
249+ "@whl_mods_hub//:requests.json" : "requests" ,
250+ "@whl_mods_hub//:wheel.json" : "wheel" ,
251+ },
252+ )
253+ pip .parse (
254+ hub_name = "pip" ,
255+ python_version = "3.11" ,
256+ requirements_by_platform = {
257+ # Default requirements file for needs to explicitly provide the platforms
258+ "//:requirements_lock_3_11.txt" : "linux_*,osx_*" ,
260259 # This API allows one to specify additional platforms that the users
261260 # configure the toolchains for themselves. In this example we add
262261 # `windows_aarch64` to illustrate that `rules_python` won't fail to
263262 # process the value, but it does not mean that this example will work
264263 # on Windows ARM.
265- "//:requirements_windows_3_10 .txt" : "windows_x86_64,windows_aarch64" ,
264+ "//:requirements_windows_3_11 .txt" : "windows_x86_64,windows_aarch64" ,
266265 },
267266 # These modifications were created above and we
268267 # are providing pip.parse with the label of the mod
0 commit comments