Skip to content

Commit 03721bc

Browse files
authored
Enhance Windows build setup for scipy-openblas
Updated Windows build configuration for cibuildwheel to include scipy-openblas and adjust environment variables for LAPACK libraries.
1 parent 40be27c commit 03721bc

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

pyproject.toml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ build-backend = "setuptools.build_meta"
66
name = "easysba"
77
version = "0.1.0"
88
description = "Python bindings for easySBA"
9-
readme = "README.md"
109
requires-python = ">=3.11"
1110
dependencies = ["numpy>=1.20"]
1211

1312
[tool.cibuildwheel]
1413
build-frontend = "build"
1514
skip = "*-musllinux* *-win32"
1615
test-skip = "*"
16+
17+
# Default environment for Linux
1718
environment = { 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]
2324
environment = { 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

Comments
 (0)