cibuildwheel icon indicating copy to clipboard operation
cibuildwheel copied to clipboard

Case sensitivity of CIBW_ARCHS for Windows on ARM64

Open hugovk opened this issue 8 months ago • 1 comments

Description

With:

https://github.com/ultrajson/ultrajson/pull/663/commits/f60b4f665b717ecb6fd8272cad25aa5a7e2ff170

We got an error:

cibuildwheel: Invalid archs option {<Architecture.arm64: 'arm64'>}. Windows only supports [<Architecture.AMD64: 'AMD64'>, <Architecture.ARM64: 'ARM64'>, <Architecture.x86: 'x86'>] at the moment. If you want to set emulation architectures on Linux, use CIBW_ARCHS_LINUX instead.
  architectures: arm64
  build_selector: 
    build_config: *
    skip_config: pp39*
    requires_python: >=3.9
    enable: ['cpython-prerelease', 'pypy']

Changing it to uppercase fixed it:

-CIBW_ARCHS: "arm64"
+CIBW_ARCHS: "ARM64"

https://github.com/ultrajson/ultrajson/actions/runs/14591266684/job/40927895459?pr=663 https://github.com/ultrajson/ultrajson/actions/runs/14591266684/workflow?pr=663

The docs at https://cibuildwheel.pypa.io/en/stable/options/#archs do indeed show uppercase "ARM64" for Windows and lowercase "arm64" for macOS, but don't mention if they are case-sensitive.

  • If they are case sensitive, and it makes sense for them to remain so, please close this.

  • If they are case sensitive, but they don't need to be, this is a feature request.

  • If they are not meant to be case sensitive, this is a bug report.

I was a little surprised by the case sensitivity, and misread the error as Windows on ARM64 being unavailable for PyPy (which as it happens is true, but not what's being reported here).

Allowing either case will remove a little paper cut and help avoid confusion as others add support for Windows on ARM64.

Thank you!

Build log

https://github.com/ultrajson/ultrajson/actions/runs/14590225899/job/40925835572?pr=663

CI config

https://github.com/ultrajson/ultrajson/actions/runs/14590225899/workflow?pr=663

hugovk avatar Apr 22 '25 16:04 hugovk

We just matched the casing from platform.machine() as I remember. But admittedly, errors like the above are not very user-friendly. Especially when the only difference between the windows ARM64 and the mac arm64 is the casing! There's no risk of ambiguity from changing the casing so I'd be in favour of allowing case-insensitivity here.

joerick avatar Aug 11 '25 14:08 joerick