@@ -14,6 +14,8 @@ dependencies = ["numpy>=1.20"]
1414build-frontend = " build"
1515skip = " *-musllinux* *-win32"
1616test-skip = " *"
17+
18+ # Default environment for Linux
1719environment = { EASYSBA_LAPACK_LIBS = " openblas" }
1820
1921[tool .cibuildwheel .linux ]
@@ -22,14 +24,17 @@ before-all = "yum -y install openblas-devel lapack-devel"
2224[tool .cibuildwheel .macos ]
2325environment = { EASYSBA_USE_ACCELERATE = " 1" , EASYSBA_LAPACK_LIBS = " " }
2426
25- # [tool.cibuildwheel.windows]
26- # environment = { EASYSBA_LAPACK_LIBS = "openblas" }
27-
2827[tool .cibuildwheel .windows ]
29- # Install delvewheel to bundle the DLL into the wheel
30- before- build = " pip install delvewheel "
31- repair-wheel-command = " delvewheel repair --add-path C: \\ vcpkg \\ installed \\ x64-windows \\ bin -w {dest_dir} {wheel} "
28+ # We already installed these on the host, but we install them in the
29+ # build venv as well to be safe for the repair step.
30+ before-build = " pip install scipy-openblas delvewheel "
3231
3332[tool .cibuildwheel .windows .environment ]
34- # Match the filename vcpkg actually produces: libopenblas
35- EASYSBA_LAPACK_LIBS = " libopenblas"
33+ EASYSBA_LAPACK_LIBS = " openblas"
34+ # These $(...) commands will now work because scipy-openblas is on the host
35+ INCLUDE = " $(python -c \" import scipy_openblas; print(scipy_openblas.get_include_dir())\" );$INCLUDE"
36+ LIB = " $(python -c \" import scipy_openblas; print(scipy_openblas.get_lib_dir())\" );$LIB"
37+
38+ [tool .cibuildwheel .windows .repair-wheel-command ]
39+ # Use the repair-wheel-command to bundle the DLL
40+ repair-wheel-command = " python -c \" import scipy_openblas, subprocess, sys; subprocess.check_call(['delvewheel', 'repair', '--add-path', scipy_openblas.get_lib_dir(), '-w', sys.argv[1], sys.argv[2]])\" {dest_dir} {wheel}"
0 commit comments