From 1e1f05b77790d7b252c2772b289a1c1bdae57504 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Mon, 30 Nov 2026 12:46:35 -0500 Subject: [PATCH 1/2] Do not overwrite prefixed LAPACKE headers on Windows The CMake build writes lapacke.h and lapack.h with SYMBOLPREFIX and SYMBOLSUFFIX applied to build/generated, but build_steps_win.bat copied the unmodified lapack-netlib headers over them afterwards. Since the switch to the CMake build in 0.3.34.481.4, the Windows wheels therefore shipped headers declaring e.g. LAPACKE_dsptrf while the library exports scipy_LAPACKE_dsptrf64_. Copy the netlib headers first so the generated ones take precedence, and fail the build if the installed lapacke.h lacks the scipy_ prefix. Co-Authored-By: Claude Opus 5.5 --- tools/build_steps_win.bat | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tools/build_steps_win.bat b/tools/build_steps_win.bat index 3c32ceaa..107cda9e 100755 --- a/tools/build_steps_win.bat +++ b/tools/build_steps_win.bat @@ -322,17 +322,25 @@ if not exist "%DEST_DIR%\lib\cmake\openblas\OpenBLASConfig.cmake" ( ) if exist openblasconfigversion.cmake copy /Y openblasconfigversion.cmake "%DEST_DIR%\lib\cmake\openblas\" +REM Copy LAPACKE header files first: the generated directory below contains +REM lapacke.h and lapack.h rewritten with SYMBOLPREFIX/SYMBOLSUFFIX, which +REM must overwrite these unmodified netlib copies, not the other way around. +echo Copying LAPACKE header files... +xcopy /Y "..\lapack-netlib\lapacke\include\*.h" "%DEST_DIR%\include\" +if errorlevel 1 exit /b 1 + REM Copy header files echo Copying generated header files... if exist generated xcopy /E /Y generated "%DEST_DIR%\include\" if exist lapacke_mangling.h copy /Y lapacke_mangling.h "%DEST_DIR%\include\" if exist openblas_config.h copy /Y openblas_config.h "%DEST_DIR%\include\" - -REM Copy LAPACKE header files -echo Copying LAPACKE header files... -xcopy /Y "..\lapack-netlib\lapacke\include\*.h" "%DEST_DIR%\include\" -if errorlevel 1 exit /b 1 +REM Make sure the shipped lapacke.h uses the prefixed names the library exports +findstr /c:"scipy_LAPACKE_dgesv" "%DEST_DIR%\include\lapacke.h" >NUL +if errorlevel 1 ( + echo Error: lapacke.h in %DEST_DIR%\include does not use the scipy_ prefix. + exit /b 1 +) echo Create pkgconfig scipy-openblas.pc if not exist "%DEST_DIR%\lib\pkgconfig" mkdir "%DEST_DIR%\lib\pkgconfig" From 74648bb06b17196db487fc83c16b22ae7acc6554 Mon Sep 17 00:00:00 2001 From: mattip Date: Mon, 30 Nov 2026 21:15:59 +0200 Subject: [PATCH 2/2] bump version and add changelog line --- CHANGELOG.md | 5 +++++ pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce3a9dfd..3e5995b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## OpenBLAS v0.3.34 (v0.3.34) +### 0.3.34.481.6 (2026-11-30) + +- Use the correct lapack headers for windows builds (function names with + extensions) + ### 0.3.34.481.5 (2026-11-30) - Patch threading in gesv on win-arm64 diff --git a/pyproject.toml b/pyproject.toml index f0ff9525..772f6c7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta" [project] name = "scipy-openblas64" # 0.3.34-481-g5137bb62 -version = "0.3.34.481.5" +version = "0.3.34.481.6" requires-python = ">=3.7" description = "Provides OpenBLAS for python packaging" readme = "README.md"