From 7ca15bab51b2ec45abc3a2fa9878a799f8de86ba Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Wed, 7 Jan 2026 11:40:07 +0100 Subject: [PATCH] BLD: fix wheel builds on Windows Ensure we're using MSVC; avoids finding a broken link.exe which again got added to a GHA runner image. Error message was: ``` ..\meson.build:1:0: ERROR: Found GNU link.exe instead of MSVC link.exe in C:\Program Files\Git\usr\bin\link.EXE. This link.exe is not a linker. You may need to reorder entries to your %PATH% variable to resolve this. ``` --- pyproject.toml | 6 ++++++ util/cibw_before_build_win.sh | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 util/cibw_before_build_win.sh diff --git a/pyproject.toml b/pyproject.toml index 38ba572c..f3991905 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,6 +55,12 @@ homepage = "https://github.com/PyWavelets/pywt" source = "https://github.com/PyWavelets/pywt" documentation = "https://pywavelets.readthedocs.io/" + +[tool.cibuildwheel.windows] +config-settings = {setup-args = ["--vsenv"]} +before-build = "bash {project}/util/cibw_before_build_win.sh" + + [tool.ruff] line-length = 88 target-version = 'py310' diff --git a/util/cibw_before_build_win.sh b/util/cibw_before_build_win.sh new file mode 100644 index 00000000..9c750d57 --- /dev/null +++ b/util/cibw_before_build_win.sh @@ -0,0 +1,4 @@ +set -xe + +# Avoid this in GHA: "ERROR: Found GNU link.exe instead of MSVC link.exe" +rm /c/Program\ Files/Git/usr/bin/link.EXE