Skip to content

Conversation

@MugundanMCW
Copy link

@MugundanMCW MugundanMCW commented Dec 15, 2025

Rationale for this change

  • The adoption of Windows on ARM (WoA) devices is steadily increasing, yet many Python wheels are still not available for this platform.
  • GitHub Actions now offers native CI runners for Windows on ARM devices (windows-11-arm), enabling automated builds and testing.
  • Currently, official PyArrow Python wheels are not provided for Windows ARM64, and users and developers face difficulties using the popular PyArrow library natively.
  • This PR introduces support for building PyArrow wheels on Windows ARM64, improving accessibility for developers and end users on this emerging platform.

What changes are included in this PR?

  • The current Windows x64 CI pipeline depends on a Windows Docker container. Windows ARM64 Docker support is still experimental and does not yet support Windows ARM64 containers.
  • To overcome this limitation, this PR uses the native GitHub Windows ARM64 environment instead of relying on Docker containers.
  • The following changes are made to add wheel builder support for PyArrow on Windows ARM64:
    • Added a Windows ARM64 build configuration in task.yml.
    • Added a new GitHub workflow file (github.windows.arm64.yml) for building PyArrow.
    • Added a batch script invoked by the workflow to build both the C++ and Python components of Arrow using the MSVC toolchain.
    • Updated vcpkg.json to exclude the xsimd dependency on Windows ARM64 due to MSVC compatibility issues.

Are these changes tested?

  • Yes, built locally and test its functionality on Native Windows ARM64 device.

Are there any user-facing changes?

  • No

Github Issue: #47195

@github-actions github-actions bot added the awaiting review Awaiting review label Dec 15, 2025
@amoeba amoeba changed the title GH-47196: [CI][Python] Add support for building PyArrow library on Windows ARM64 GH-47195: [Python][CI] Add support for building PyArrow library on Windows ARM64 Dec 15, 2025
@github-actions
Copy link

⚠️ GitHub issue #47195 has been automatically assigned in GitHub to PR creator.

Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Dec 16, 2025
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Dec 16, 2025
@raulcd
Copy link
Member

raulcd commented Dec 16, 2025

@github-actions crossbow submit wheel-windows-*arm64

@github-actions
Copy link

Revision: bc3020d

Submitted crossbow builds: ursacomputing/crossbow @ actions-15d135b85a

Task Status
wheel-windows-cp310-cp310-arm64 GitHub Actions
wheel-windows-cp311-cp311-arm64 GitHub Actions
wheel-windows-cp312-cp312-arm64 GitHub Actions
wheel-windows-cp313-cp313-arm64 GitHub Actions
wheel-windows-cp313-cp313t-arm64 GitHub Actions
wheel-windows-cp314-cp314-arm64 GitHub Actions
wheel-windows-cp314-cp314t-arm64 GitHub Actions

@pitrou
Copy link
Member

pitrou commented Dec 16, 2025

Updated vcpkg.json to exclude the xsimd dependency on Windows ARM64 due to MSVC compatibility issues.

Can you open report the issue on the xsimd issue tracker? Better yet if you can help them fix the issue :)

Added a batch script invoked by the workflow to build both the C++ and Python components of Arrow using the MSVC toolchain.

Is there a reason to use a separate script? It seems quite similar to the one for x86 Windows wheels.

@MugundanMCW
Copy link
Author

MugundanMCW commented Dec 17, 2025

Hi @pitrou

Can you open report the issue on the xsimd issue tracker? Better yet if you can help them fix the issue :)

  • Regarding xsimd, there is already an existing issue in the repository tracking MSVC compatibility, and we are currently working on resolving the compilation errors encountered when building xsimd with MSVC.

Is there a reason to use a separate script? It seems quite similar to the one for x86 Windows wheels.

  • The existing x86 wheel build script contains some x86 specific information that are currently hardcoded. To enable Windows ARM64 support, I have created a separate script with the corresponding ARM64 specific information.
  • Alternatively, these Windows ARM64 compatibility changes can be integrated into the existing script by updating it to detect the target architecture at runtime and define appropriate build configurations. Please let me know If I would have to integrate the ARM64 compatibility changes in the existing script.

@pitrou
Copy link
Member

pitrou commented Dec 17, 2025

Alternatively, these Windows ARM64 compatibility changes can be integrated into the existing script by updating it to detect the target architecture at runtime and define appropriate build configurations. Please let me know If I would have to integrate the ARM64 compatibility changes in the existing script.

Yes, please do so.

@MugundanMCW
Copy link
Author

Hi @pitrou
I have integrated both the ARM64 and x86 wheel build processes into the python_wheel_windows_build batch script. Please let me know if any further changes are needed.

@khmyznikov
Copy link

Happy new year! Looking forward to see it merged 😊


@REM Set architecture-specific options
if "%arch%"=="ARM64" (
set CMAKE_PLATFORM=ARM64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make sure CMAKE_PLATFORM is always set?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have modified CMAKE_PLATFORM to set for both x64 and ARM64 as per the build configurations.

del /s /q C:\arrow\python\build
del /s /q C:\arrow\python\pyarrow\*.so
del /s /q C:\arrow\python\pyarrow\*.so.*
if "%arch%"=="x64" (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this condition?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, this condition was needed because .so files are not generated on Windows ARM64, so these cleanup steps would fail there. However, I have now made this block common for both ARM64 and x64 since running these commands does not cause any issues on ARM64 either.

) else (
set ARROW_SUBSTRAIT=ON
set ARROW_TENSORFLOW=ON
set ARROW_WITH_BROTLI=ON
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why wouldn't these be enabled on ARM64?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially, these options are disabled to produce a minimal PyArrow build on Windows ARM64. The current patch enables all features except xsimd support.

-A "%CMAKE_PLATFORM%" ^
C:\arrow\cpp || exit /B 1

if "%arch%"=="ARM64" (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the different code paths? Please let's reconcile them and make sure this scripts remains easily maintainable.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pitrou I’ve updated the source to share common code paths between x64 and ARM64.

Comment on lines 204 to 206
if "%arch%"=="ARM64" (
set Arrow_DIR=%ARROW_DIST%\lib\cmake\arrow
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition has been removed and Arrow_DIR env variable is not required to get the successful build.

Comment on lines 210 to 215
if "%arch%"=="ARM64" (
@REM Install Python dependencies for Win-ARM64
echo "=== Installing Python dependencies ==="
%PYTHON_CMD% -m pip install --upgrade pip || exit /B 1
%PYTHON_CMD% -m pip install cython numpy setuptools_scm setuptools wheel || exit /B 1
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not install these in a dedicated step in the GitHub Actions workflow?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pitrou I have moved these steps as part of Windows ARM64 workflow.

Comment on lines +231 to +233
%PYTHON_CMD% -m delvewheel repair -vv --add-path "%ARROW_DIST%\bin" ^
--add-path "C:\vcpkg\installed\arm64-windows\bin" --ignore-existing ^
--with-mangle -w repaired_wheels %WHEEL_NAME% || exit /B 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the --add-path options needed? Can you add a comment?

Copy link
Author

@MugundanMCW MugundanMCW Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --add-path options are used to help delvewheel locate and bundle native ARM64 DLL dependencies (from vcpkg and pyarrow) that are not in standard system locations.

uses: actions/cache@v4
with:
path: C:\vcpkg\installed
key: "{% raw %}vcpkg-installed-windows-arm64-${{ hashFiles('arrow/ci/vcpkg/vcpkg.json', 'arrow/ci/vcpkg/arm64-windows-*.cmake') }}{% endraw %}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why arrow/ci/vcpkg/arm64-windows-*.cmake?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line "arrow/ci/vcpkg/arm64-windows-*.cmake" is not required and it can be removed from the key.

- name: Build Arrow C++ and PyArrow wheel
shell: cmd
env:
arch: "ARM64"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep environment variables uppercase?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@pitrou
Copy link
Member

pitrou commented Jan 12, 2026

@github-actions crossbow submit wheel-windows-cp314-*arm64

@github-actions
Copy link

Revision: 28731a7

Submitted crossbow builds: ursacomputing/crossbow @ actions-8da1bbedc9

Task Status
wheel-windows-cp314-cp314-arm64 GitHub Actions
wheel-windows-cp314-cp314t-arm64 GitHub Actions

@MugundanMCW
Copy link
Author

Hi @pitrou

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting change review Awaiting change review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants