Commit 071b1af
CI: add MSVC activation to the build-wheels Windows job too
The previous MSVC fix landed only in the `test` job, where I assumed
cibuildwheel handled MSVC activation for its Windows wheel builds
automatically. It does not — cibuildwheel's auto-MSVC logic applies to
distutils/setuptools-based projects (where distutils itself knows how
to invoke vcvarsall because Python is built with MSVC), but
meson-python uses meson's own compiler discovery, which picks up the
first C compiler on the runner PATH.
On GitHub Actions' windows-latest, that first compiler is Strawberry
Perl's bundled MinGW-w64 gcc 15.2.0 in C:\Strawberry\c\bin — confirmed
in the wheel build log:
C compiler for the host machine: C:\Strawberry\c\bin\ccache.EXE cc
(gcc 15.2.0 "cc (x86_64-posix-seh-rev1, Built by MinGW-Builds
project) 15.2.0")
The resulting .pyd files link against libgomp-1.dll / libgcc_s_seh-1.dll
which are not on the wheel-test environment's DLL search path, so
cibuildwheel's own test phase fails with the same ImportError we
already diagnosed for the test job.
Fix: add `ilammy/msvc-dev-cmd@v1` step before the cibuildwheel step in
the build-wheels job, conditional on runner.os == 'Windows'. The
existing step in the test job is unchanged.
Also update ~/.claude/CI-SETUP-NOTES.md and ~/.claude/CLAUDE.md to
state that the MSVC activation step needs to land in BOTH jobs, not
just the test job (my earlier writeup incorrectly claimed cibuildwheel
handled the build-wheels side automatically).
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent 43911e7 commit 071b1af
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
97 | 108 | | |
98 | 109 | | |
99 | | - | |
| 110 | + | |
100 | 111 | | |
101 | 112 | | |
102 | 113 | | |
| |||
0 commit comments