Skip to content

Commit 5d878d0

Browse files
committed
a fix for win arm build
1 parent df000c9 commit 5d878d0

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/wheels.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
- os_name: windows-arm64
2727
runner: windows-11-arm
2828
rust_target: aarch64-pc-windows-msvc
29+
python_versions: "3.11 3.12 3.13 3.14 3.14t"
2930
- os_name: macos-intel
3031
runner: macos-15-intel
3132
rust_target: x86_64-apple-darwin
@@ -57,6 +58,8 @@ jobs:
5758

5859
- name: Build wheels
5960
shell: bash
61+
env:
62+
RSLOOP_PYTHON_VERSIONS: ${{ matrix.python_versions }}
6063
run: scripts/build-wheels.sh --out dist --target "${{ matrix.rust_target }}"
6164

6265
- name: Upload wheel artifacts

scripts/build-wheels.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,20 @@ target_python_request() {
8585
printf 'cpython-%s-%s-%s-%s\n' "$version" "$os" "$arch" "$libc"
8686
}
8787

88+
default_versions_for_target() {
89+
local target="$1"
90+
91+
case "$target" in
92+
aarch64-pc-windows-msvc)
93+
# Windows ARM64 Python distributions are only available for newer CPython releases.
94+
printf '%s\n' 3.11 3.12 3.13 3.14 3.14t
95+
;;
96+
*)
97+
printf '%s\n' "${DEFAULT_VERSIONS[@]}"
98+
;;
99+
esac
100+
}
101+
88102
OUTPUT_DIR="$DEFAULT_OUTPUT_DIR"
89103
INSTALL_PYTHONS=1
90104
RUST_TARGET="${RSLOOP_RUST_TARGET:-}"
@@ -132,7 +146,7 @@ done
132146
if [[ -n "${RSLOOP_PYTHON_VERSIONS:-}" ]]; then
133147
read -r -a PYTHON_VERSIONS <<< "${RSLOOP_PYTHON_VERSIONS}"
134148
else
135-
PYTHON_VERSIONS=("${DEFAULT_VERSIONS[@]}")
149+
readarray -t PYTHON_VERSIONS < <(default_versions_for_target "$RUST_TARGET")
136150
fi
137151

138152
OUTPUT_DIR="$(resolve_path "$OUTPUT_DIR")"

0 commit comments

Comments
 (0)