Skip to content

Add Windows ARM64 wheel distribution - #3735

Merged
fishy merged 1 commit into
apache:masterfrom
ndabas:master
Aug 21, 2026
Merged

Add Windows ARM64 wheel distribution#3735
fishy merged 1 commit into
apache:masterfrom
ndabas:master

Conversation

@ndabas

@ndabas ndabas commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

As the title says. It's mostly straightforward.

One of the slightly hacky bits is the change in lib/py/setup.py to not include compat/win32/stdint.h when building in CI. That shim is not needed anyway for most versions of Visual C++/Build Tools found in the wild today. However I did not get rid of it altogether because someone, somewhere might have a version that does need it. The AMD64 build seems to work fine in any case, but on ARM64 the arm64_neon.h file chokes on it. Let me know if there is a better idea to handle this.

  • Did you create an Apache Jira ticket? (Request account here, not required for trivial changes)
  • If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
  • Did you squash your changes to a single commit? (not required, but preferred)
  • Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"?
  • If your change does not involve any code, include [skip ci] anywhere in the commit message to free up build resources.

@ndabas
ndabas requested a review from Jens-G as a code owner August 20, 2026 22:01
Copilot AI lite review requested due to automatic review settings August 20, 2026 22:01
@mergeable mergeable Bot added python github_actions Pull requests that update GitHub Actions code labels Aug 20, 2026
Comment thread doc/ReleaseManagement.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Windows ARM64 wheel distribution support for PyPI releases.

Changes:

  • Adds a Windows ARM64 cibuildwheel job.
  • Adjusts Windows header handling and raises the setuptools minimum.
  • Documents Windows AMD64 and ARM64 distributions.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Summary
lib/py/setup.py Adjusts Windows header inclusion for cibuildwheel builds.
lib/py/pyproject.toml Raises the minimum setuptools version.
doc/ReleaseManagement.md Documents Windows ARM64 wheels.
.github/workflows/pypi.yml Adds ARM64 wheel builds; the ARM64 pattern must start at cp311 rather than requesting unsupported cp310 builds.
Suppressed comments (1)

lib/py/setup.py:40

  • Because cibuildwheel sets CIBUILDWHEEL=1 for both matrix entries, this condition removes compat/win32 from the Windows AMD64 build as well as the ARM64 build. That regresses the compatibility path for older MSVC toolchains and contradicts the stated intent to retain the shim; restrict the exception to the ARM64 job by checking the selected cibuildwheel architecture as well.
    if os.environ.get('CIBUILDWHEEL') != '1':
        include_dirs.append('compat/win32')

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/pypi.yml
Copilot AI review requested due to automatic review settings August 20, 2026 22:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Suppressed comments (1)

lib/py/pyproject.toml:2

  • This minimum still permits setuptools 65.4.1 through 68.x, but CHANGES.md:315 documents that pip install fails with setuptools < 69 because of the PEP 517 setup.py flow. A consumer or build environment pinned to the declared minimum can therefore remain broken; raise the lower bound to the first known working version.
requires = ["setuptools>=65.4.1", "wheel"]

@fishy

fishy commented Aug 20, 2026

Copy link
Copy Markdown
Member

@ndabas

ndabas commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

the MSVC build on CI failed: https://github.com/apache/thrift/actions/runs/32422316847/job/96597632215

That's odd, because I haven't touched any of the C++ sources, and looking at the build logs, the compat/win32 dir is still included as it was before on the cl command line. Do you have any ideas why this might be?

@fishy

fishy commented Aug 21, 2026

Copy link
Copy Markdown
Member

then maybe it's just flaky and you can retry it to see if it works.

Copilot AI review requested due to automatic review settings August 21, 2026 06:38
@ndabas

ndabas commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

then maybe it's just flaky and you can retry it to see if it works.

I don't see the option to re-run the workflow myself, I have squashed and force pushed the commits, so let's try again when someone is able to approve the workflows. Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

.github/workflows/pypi.yml:115

  • This adds a new platform to the release matrix, which is a non-trivial change under the repository contribution requirements, but the PR metadata has no THRIFT JIRA ticket or title prefix. Please add or link the required JIRA issue before merging.
          - platform: windows-arm64
            runner: windows-11-arm
            archs: ARM64
            build: "cp310-win_* cp311-win_* cp312-win_* cp313-win_* cp314-win_*"

Comment thread lib/py/setup.py
Comment on lines +39 to +40
if os.environ.get('CIBUILDWHEEL') != '1':
include_dirs.append('compat/win32')

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The Python versions we are building wheels for need Visual C++ 14 or higher to build, which includes a proper stdint.h -- therefore, the shim included from compat/win32 is never going to be needed for any (AMD64 or ARM64) builds when compiled from cibuildwheel.

@fishy fishy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good to me, but we'll only know whether it works when we actually cut a release next time.

@fishy
fishy merged commit da7b699 into apache:master Aug 21, 2026
106 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants