Skip to content

Commit 325146d

Browse files
TransurgeonTransurgeonclaude
authored
Repair Windows wheels with delvewheel to bundle openblas.dll (#17)
Windows wheels shipped a .pyd that dynamically links openblas.dll from vcpkg, but cibuildwheel has no default repair step on Windows (unlike auditwheel/delocate), so the DLL was never bundled and every import failed with 'DLL load failed'. Run delvewheel to vendor the DLL into the wheel, and add a smoke-test import on all platforms so a broken wheel can't publish again. Fixes #15 Co-authored-by: Transurgeon <peter.zijie@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 9b53124 commit 325146d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎.github/workflows/build-and-publish.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,11 @@ jobs:
6565
CIBW_ARCHS_MACOS: "x86_64 universal2"
6666
CIBW_ARCHS_LINUX: "auto aarch64"
6767
CIBW_BEFORE_BUILD_LINUX: "yum install -y openblas-devel || apt-get install -y libopenblas-dev"
68-
CIBW_BEFORE_BUILD_WINDOWS: "vcpkg install openblas:x64-windows"
68+
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel && vcpkg install openblas:x64-windows"
6969
CIBW_ENVIRONMENT_WINDOWS: "CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
70+
# Bundle openblas.dll into the wheel (auditwheel/delocate handle this on Linux/macOS)
71+
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel} --add-path C:/vcpkg/installed/x64-windows/bin"
72+
CIBW_TEST_COMMAND: python -c "import sparsediffpy"
7073
- name: Check wheels
7174
shell: bash
7275
run: |

0 commit comments

Comments
 (0)