Skip to content

Commit a5745f6

Browse files
committed
feat(pypi): support aarch64 windows on pipstar
This adds the necessary bits for Windows ARM64 support when evaluating env markers in requirements files and selecting the right wheels in `experimental_index_url`. Related #2276
1 parent 1ebc93f commit a5745f6

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ END_UNRELEASED_TEMPLATE
129129
* {obj}`//python:features.bzl%features.headers_abi3` can be used to
130130
feature-detect the presense of the above.
131131
* (toolchains) Local toolchains can use a label for the interpreter to use.
132+
* (pypi) Support for environment marker handling and `experimental_index_url` handling for
133+
Windows ARM64 for Python 3.11 and later
134+
([#2276](https://github.com/bazel-contrib/rules_python/issues/2276)).
132135

133136
{#v1-6-3}
134137
## [1.6.3] - 2025-09-21

MODULE.bazel

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,35 @@ pip = use_extension("//python/extensions:pip.bzl", "pip")
171171
]
172172
]
173173

174+
[
175+
pip.default(
176+
arch_name = cpu,
177+
config_settings = [
178+
"@platforms//cpu:{}".format(cpu),
179+
"@platforms//os:windows",
180+
"//python/config_settings:_is_py_freethreaded_{}".format(
181+
"yes" if freethreaded else "no",
182+
),
183+
],
184+
env = {"platform_version": "0"},
185+
marker = "python_version >= '3.13'" if freethreaded else "python_version >= '3.11'",
186+
os_name = "windows",
187+
platform = "windows_{}{}".format(cpu, freethreaded),
188+
whl_abi_tags = ["cp{major}{minor}t"] if freethreaded else [
189+
"abi3",
190+
"cp{major}{minor}",
191+
],
192+
whl_platform_tags = whl_platform_tags,
193+
)
194+
for cpu, whl_platform_tags in {
195+
"aarch64": ["win_arm64"],
196+
}.items()
197+
for freethreaded in [
198+
"",
199+
"_freethreaded",
200+
]
201+
]
202+
174203
pip.parse(
175204
hub_name = "rules_python_publish_deps",
176205
python_version = "3.11",

examples/bzlmod/MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ pip.default(
172172
os_name = "windows",
173173
platform = "windows_aarch64",
174174
whl_abi_tags = [], # default to all ABIs
175-
whl_platform_tags = ["win_amd64"],
175+
whl_platform_tags = ["win_arm64"],
176176
)
177177

178178
# To fetch pip dependencies, use pip.parse. We can pass in various options,

0 commit comments

Comments
 (0)