Skip to content

Commit e608e37

Browse files
authored
Update cibuildwheel configuration for Windows
Refactor Windows environment setup for cibuildwheel.
1 parent 2d749e7 commit e608e37

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,16 @@ before-all = "yum -y install openblas-devel lapack-devel"
2424
environment = { EASYSBA_USE_ACCELERATE = "1", EASYSBA_LAPACK_LIBS = "" }
2525

2626
[tool.cibuildwheel.windows]
27-
# 1. Install scipy-openblas (the lib) and delvewheel (to bundle the DLL)
27+
# We already installed these on the host, but we install them in the
28+
# build venv as well to be safe for the repair step.
2829
before-build = "pip install scipy-openblas delvewheel"
2930

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" }
31+
[tool.cibuildwheel.windows.environment]
32+
EASYSBA_LAPACK_LIBS = "openblas"
33+
# These $(...) commands will now work because scipy-openblas is on the host
34+
INCLUDE = "$(python -c \"import scipy_openblas; print(scipy_openblas.get_include_dir())\");$INCLUDE"
35+
LIB = "$(python -c \"import scipy_openblas; print(scipy_openblas.get_lib_dir())\");$LIB"
3236

33-
# 3. Repair the wheel: this bundles openblas.dll into the .whl file
37+
[tool.cibuildwheel.windows.repair-wheel-command]
38+
# Use the repair-wheel-command to bundle the DLL
3439
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)