@@ -6,14 +6,15 @@ build-backend = "setuptools.build_meta"
66name = " easysba"
77version = " 0.1.0"
88description = " Python bindings for easySBA"
9- readme = " README.md"
109requires-python = " >=3.11"
1110dependencies = [" numpy>=1.20" ]
1211
1312[tool .cibuildwheel ]
1413build-frontend = " build"
1514skip = " *-musllinux* *-win32"
1615test-skip = " *"
16+
17+ # Default environment for Linux
1718environment = { EASYSBA_LAPACK_LIBS = " openblas" }
1819
1920[tool .cibuildwheel .linux ]
@@ -22,14 +23,12 @@ before-all = "yum -y install openblas-devel lapack-devel"
2223[tool .cibuildwheel .macos ]
2324environment = { EASYSBA_USE_ACCELERATE = " 1" , EASYSBA_LAPACK_LIBS = " " }
2425
25- # [tool.cibuildwheel.windows]
26- # environment = { EASYSBA_LAPACK_LIBS = "openblas" }
27-
2826[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}"
27+ # 1. Install scipy-openblas (the lib) and delvewheel (to bundle the DLL)
28+ before-build = " pip install scipy-openblas delvewheel"
29+
30+ # 2. Extract paths from scipy-openblas and set them for the compiler
31+ environment = { EASYSBA_LAPACK_LIBS =" openblas" , INCLUDE =" $(python -c \" import scipy_openblas; print(scipy_openblas.get_include_dir())\" );$INCLUDE" , LIB =" $(python -c \" import scipy_openblas; print(scipy_openblas.get_lib_dir())\" );$LIB" }
3232
33- [tool .cibuildwheel .windows .environment ]
34- # Match the filename vcpkg actually produces: libopenblas
35- EASYSBA_LAPACK_LIBS = " libopenblas"
33+ # 3. Repair the wheel: this bundles openblas.dll into the .whl file
34+ repair-wheel-command = " delvewheel repair --add-path $(python -c \" import scipy_openblas; print(scipy_openblas.get_lib_dir())\" ) -w {dest_dir} {wheel}"
0 commit comments