From e850683d370423fab38d0c3773c83afccf7121c9 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Tue, 11 Aug 2026 20:09:30 -0700 Subject: [PATCH 1/3] Build a Windows ARM64 wheel BelfrySCAD cannot run on Windows on ARM at all: there is no openscad_cpp_evaluator wheel for it, so nothing else about that platform matters. This tries to close that. Cross-compiled on the x86_64 runner rather than built on a windows-11-arm one. bison and flex are host build tools here -- they generate C++ that MSVC then cross-compiles for ARM64 -- and MSYS2, which is where this build gets a bison new enough for the grammar (3.8+; winflexbison3 ships 3.7.4, already confirmed too old by a CI failure), has no native ARM64 build. Building on an ARM runner would mean emulating it. cibuildwheel skips CIBW_TEST_COMMAND for the cross-compiled wheel, since an x86_64 host cannot run an ARM64 one. That is the cost of this approach: the wheel is built but not smoke-tested by CI. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/wheels.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e99ffc4..bb05de9 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -57,7 +57,15 @@ jobs: CIBW_SKIP: "*-musllinux*" # cibuildwheel builds win32 in addition to win_amd64 by default; # this project only targets 64-bit Windows. - CIBW_ARCHS_WINDOWS: AMD64 + # ARM64 is cross-compiled here on the x86_64 runner rather than + # built on a windows-11-arm one, because bison and flex are host + # build tools: they generate C++ that MSVC then cross-compiles for + # ARM64. MSYS2 -- which is where this build gets a bison new enough + # for the grammar (3.8+, winflexbison3 ships 3.7.4) -- has no native + # ARM64 build at all, so building on an ARM runner would have to + # emulate it. cibuildwheel skips CIBW_TEST_COMMAND for the + # cross-compiled wheel, since an x86_64 host cannot run it. + CIBW_ARCHS_WINDOWS: "AMD64 ARM64" CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 # manylinux_2_28 (AlmaLinux 8) uses dnf, not apt -- but its default From 557e80be5f281cc70a247f4e48312abbdd5f39a1 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Tue, 11 Aug 2026 20:25:34 -0700 Subject: [PATCH 2/3] Repair the cross-built ARM64 wheel without the x86_64 CRT The ARM64 wheel compiles fine on the x86_64 runner -- the failure was in delvewheel, which vendors the MSVC runtime into the wheel and could only find the x86_64 msvcp140.dll on an x86_64 host: "Unable to find library: msvcp140.dll". The ARM64 wheel now excludes the runtime DLLs and leaves them to the system, which is what every Python extension on Windows already assumes (CPython itself requires the redistributable). AMD64 keeps vendoring them, so its wheel is unchanged. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/wheels.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index bb05de9..3e4585f 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -66,6 +66,18 @@ jobs: # emulate it. cibuildwheel skips CIBW_TEST_COMMAND for the # cross-compiled wheel, since an x86_64 host cannot run it. CIBW_ARCHS_WINDOWS: "AMD64 ARM64" + # delvewheel vendors the MSVC runtime into the wheel, but on an + # x86_64 host it can only find the x86_64 copy -- repairing the + # cross-built ARM64 wheel died with "Unable to find library: + # msvcp140.dll". The ARM64 wheel therefore leaves the runtime to + # the system, which is what every Python extension on Windows + # already assumes (CPython itself needs the redistributable). + # AMD64 keeps vendoring it, unchanged. + CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >- + cmd /c "echo {wheel} | findstr /C:win_arm64 >nul && + (delvewheel repair --exclude msvcp140.dll --exclude vcruntime140.dll + --exclude vcruntime140_1.dll -w {dest_dir} {wheel}) || + (delvewheel repair -w {dest_dir} {wheel})" CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 # manylinux_2_28 (AlmaLinux 8) uses dnf, not apt -- but its default From 2c299928c2786cabc3dce0380a52af573d6f6d89 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Tue, 11 Aug 2026 20:54:00 -0700 Subject: [PATCH 3/3] Bump version for the Windows ARM64 wheel --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3e06118..69c7b39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build" [project] name = "openscad_cpp_evaluator" -version = "0.29.2" +version = "0.29.3" description = "C++ OpenSCAD evaluator with Python bindings" readme = "README.md" requires-python = ">=3.12"