From f9b160e4b44ce8aa81d386a932786ca62cd9ef25 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 08:22:47 +0000 Subject: [PATCH 1/9] Initial plan From 933e15f36d6eb6b6864a78ae3959f03c90d8091e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 08:25:05 +0000 Subject: [PATCH 2/9] Fix YAML indentation and remove duplicate build step Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com> --- .github/workflows/cibuildwheel.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index d755dc1..06c0589 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -23,13 +23,10 @@ jobs: python-version: "3.11" - name: Install cibuildwheel and build dependencies - run: | - python -m pip install --upgrade pip - # Install these on the host so cibuildwheel can resolve the paths - python -m pip install cibuildwheel scipy-openblas delvewheel - - - name: Build wheels - run: python -m cibuildwheel --output-dir wheelhouse + run: | + python -m pip install --upgrade pip + # Install these on the host so cibuildwheel can resolve the paths + python -m pip install cibuildwheel scipy-openblas delvewheel - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse From 9b0992af2a5874e8f500f269228061cb10dd34ff Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 08:30:20 +0000 Subject: [PATCH 3/9] Fix: Only install scipy-openblas and delvewheel on Windows Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com> --- .github/workflows/cibuildwheel.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 06c0589..7ffe0dc 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -22,11 +22,16 @@ jobs: with: python-version: "3.11" - - name: Install cibuildwheel and build dependencies + - name: Install cibuildwheel run: | python -m pip install --upgrade pip + python -m pip install cibuildwheel + + - name: Install Windows build dependencies + if: runner.os == 'Windows' + run: | # Install these on the host so cibuildwheel can resolve the paths - python -m pip install cibuildwheel scipy-openblas delvewheel + python -m pip install scipy-openblas delvewheel - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse From 1ea9b9156d635af0bfeb661dfb8b2eb2b79764f2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 08:32:50 +0000 Subject: [PATCH 4/9] Use scipy-openblas64 instead of scipy-openblas Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com> --- .github/workflows/cibuildwheel.yml | 2 +- pyproject.toml | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 7ffe0dc..6c934eb 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -31,7 +31,7 @@ jobs: if: runner.os == 'Windows' run: | # Install these on the host so cibuildwheel can resolve the paths - python -m pip install scipy-openblas delvewheel + python -m pip install scipy-openblas64 delvewheel - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse diff --git a/pyproject.toml b/pyproject.toml index f87603b..50c319f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,14 +27,12 @@ environment = { EASYSBA_USE_ACCELERATE = "1", EASYSBA_LAPACK_LIBS = "" } [tool.cibuildwheel.windows] # We already installed these on the host, but we install them in the # build venv as well to be safe for the repair step. -before-build = "pip install scipy-openblas delvewheel" +before-build = "pip install scipy-openblas64 delvewheel" +# Use the repair-wheel-command to bundle the DLL +repair-wheel-command = "python -c \"import scipy_openblas64, subprocess, sys; subprocess.check_call(['delvewheel', 'repair', '--add-path', scipy_openblas64.get_lib_dir(), '-w', sys.argv[1], sys.argv[2]])\" {dest_dir} {wheel}" [tool.cibuildwheel.windows.environment] EASYSBA_LAPACK_LIBS = "openblas" -# These $(...) commands will now work because scipy-openblas is on the host -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" - -[tool.cibuildwheel.windows.repair-wheel-command] -# Use the repair-wheel-command to bundle the DLL -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}" +# These $(...) commands will now work because scipy-openblas64 is on the host +INCLUDE = "$(python -c \"import scipy_openblas64; print(scipy_openblas64.get_include_dir())\");$INCLUDE" +LIB = "$(python -c \"import scipy_openblas64; print(scipy_openblas64.get_lib_dir())\");$LIB" From 47f665d1e68b0f47d646f4271951e0b4d6e99a6a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 09:30:38 +0000 Subject: [PATCH 5/9] Fix Windows build: Remove scipy-openblas64 INCLUDE path Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com> --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 50c319f..53f452f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,6 +33,7 @@ repair-wheel-command = "python -c \"import scipy_openblas64, subprocess, sys; su [tool.cibuildwheel.windows.environment] EASYSBA_LAPACK_LIBS = "openblas" -# These $(...) commands will now work because scipy-openblas64 is on the host -INCLUDE = "$(python -c \"import scipy_openblas64; print(scipy_openblas64.get_include_dir())\");$INCLUDE" +# Only add the library directory for linking. Do NOT add include directory +# to avoid conflicts with scipy-openblas64's lapack.h (has C99 complex types +# incompatible with MSVC). The project has its own lapack_compat.h header. LIB = "$(python -c \"import scipy_openblas64; print(scipy_openblas64.get_lib_dir())\");$LIB" From 72b8a88db84948c7d24d35e07f52203f22ca7e28 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 13:00:47 +0000 Subject: [PATCH 6/9] Fix Windows linking: Use correct library name scipy_openblas64_ Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com> --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 53f452f..ec3c2dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ before-build = "pip install scipy-openblas64 delvewheel" repair-wheel-command = "python -c \"import scipy_openblas64, subprocess, sys; subprocess.check_call(['delvewheel', 'repair', '--add-path', scipy_openblas64.get_lib_dir(), '-w', sys.argv[1], sys.argv[2]])\" {dest_dir} {wheel}" [tool.cibuildwheel.windows.environment] -EASYSBA_LAPACK_LIBS = "openblas" +EASYSBA_LAPACK_LIBS = "scipy_openblas64_" # Only add the library directory for linking. Do NOT add include directory # to avoid conflicts with scipy-openblas64's lapack.h (has C99 complex types # incompatible with MSVC). The project has its own lapack_compat.h header. From c052b3f8c1b895372bbded804e0b40757af1fdc8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 13:47:34 +0000 Subject: [PATCH 7/9] Fix Windows library name: use libscipy_openblas64_ with lib prefix Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com> --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ec3c2dc..b8a6ba7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ before-build = "pip install scipy-openblas64 delvewheel" repair-wheel-command = "python -c \"import scipy_openblas64, subprocess, sys; subprocess.check_call(['delvewheel', 'repair', '--add-path', scipy_openblas64.get_lib_dir(), '-w', sys.argv[1], sys.argv[2]])\" {dest_dir} {wheel}" [tool.cibuildwheel.windows.environment] -EASYSBA_LAPACK_LIBS = "scipy_openblas64_" +EASYSBA_LAPACK_LIBS = "libscipy_openblas64_" # Only add the library directory for linking. Do NOT add include directory # to avoid conflicts with scipy-openblas64's lapack.h (has C99 complex types # incompatible with MSVC). The project has its own lapack_compat.h header. From 62d24c5cdf5d637222ff07938a4437e45c70b6a4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 16:38:14 +0000 Subject: [PATCH 8/9] Fix Windows symbol names: use scipy-openblas64 naming convention Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com> --- src/lapack_compat.h | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/lapack_compat.h b/src/lapack_compat.h index 0764245..ad74bb6 100644 --- a/src/lapack_compat.h +++ b/src/lapack_compat.h @@ -7,48 +7,53 @@ extern "C" { typedef int lapack_int; +// On Windows with scipy-openblas64, symbols have scipy_ prefix and 64_ suffix +#if defined(_WIN32) || defined(_WIN64) +#define FORTRAN_WRAPPER(name) scipy_##name##64_ +#else #define FORTRAN_WRAPPER(name) name##_ +#endif -void dgeqrf_(const lapack_int *m, const lapack_int *n, double *a, +void FORTRAN_WRAPPER(dgeqrf)(const lapack_int *m, const lapack_int *n, double *a, const lapack_int *lda, double *tau, double *work, const lapack_int *lwork, lapack_int *info); -void dorgqr_(const lapack_int *m, const lapack_int *n, const lapack_int *k, +void FORTRAN_WRAPPER(dorgqr)(const lapack_int *m, const lapack_int *n, const lapack_int *k, double *a, const lapack_int *lda, const double *tau, double *work, const lapack_int *lwork, lapack_int *info); -void dtrtrs_(const char *uplo, const char *trans, const char *diag, +void FORTRAN_WRAPPER(dtrtrs)(const char *uplo, const char *trans, const char *diag, const lapack_int *n, const lapack_int *nrhs, const double *a, const lapack_int *lda, double *b, const lapack_int *ldb, lapack_int *info); -void dpotrf_(const char *uplo, const lapack_int *n, double *a, +void FORTRAN_WRAPPER(dpotrf)(const char *uplo, const lapack_int *n, double *a, const lapack_int *lda, lapack_int *info); -void dpotrs_(const char *uplo, const lapack_int *n, const lapack_int *nrhs, +void FORTRAN_WRAPPER(dpotrs)(const char *uplo, const lapack_int *n, const lapack_int *nrhs, const double *a, const lapack_int *lda, double *b, const lapack_int *ldb, lapack_int *info); -void dgetrf_(const lapack_int *m, const lapack_int *n, double *a, +void FORTRAN_WRAPPER(dgetrf)(const lapack_int *m, const lapack_int *n, double *a, const lapack_int *lda, lapack_int *ipiv, lapack_int *info); -void dgetrs_(const char *trans, const lapack_int *n, const lapack_int *nrhs, +void FORTRAN_WRAPPER(dgetrs)(const char *trans, const lapack_int *n, const lapack_int *nrhs, const double *a, const lapack_int *lda, const lapack_int *ipiv, double *b, const lapack_int *ldb, lapack_int *info); -void dgetri_(const lapack_int *n, double *a, const lapack_int *lda, +void FORTRAN_WRAPPER(dgetri)(const lapack_int *n, double *a, const lapack_int *lda, const lapack_int *ipiv, double *work, const lapack_int *lwork, lapack_int *info); -void dgesdd_(const char *jobz, const lapack_int *m, const lapack_int *n, +void FORTRAN_WRAPPER(dgesdd)(const char *jobz, const lapack_int *m, const lapack_int *n, double *a, const lapack_int *lda, double *s, double *u, const lapack_int *ldu, double *vt, const lapack_int *ldvt, double *work, const lapack_int *lwork, lapack_int *iwork, lapack_int *info); -void dsytrf_(const char *uplo, const lapack_int *n, double *a, +void FORTRAN_WRAPPER(dsytrf)(const char *uplo, const lapack_int *n, double *a, const lapack_int *lda, lapack_int *ipiv, double *work, const lapack_int *lwork, lapack_int *info); -void dsytrs_(const char *uplo, const lapack_int *n, const lapack_int *nrhs, +void FORTRAN_WRAPPER(dsytrs)(const char *uplo, const lapack_int *n, const lapack_int *nrhs, const double *a, const lapack_int *lda, const lapack_int *ipiv, double *b, const lapack_int *ldb, lapack_int *info); -void dsytri_(const char *uplo, const lapack_int *n, double *a, +void FORTRAN_WRAPPER(dsytri)(const char *uplo, const lapack_int *n, double *a, const lapack_int *lda, const lapack_int *ipiv, double *work, lapack_int *info); -void dpotf2_(const char *uplo, const lapack_int *n, double *a, +void FORTRAN_WRAPPER(dpotf2)(const char *uplo, const lapack_int *n, double *a, const lapack_int *lda, lapack_int *info); -void dpotri_(const char *uplo, const lapack_int *n, double *a, +void FORTRAN_WRAPPER(dpotri)(const char *uplo, const lapack_int *n, double *a, const lapack_int *lda, lapack_int *info); #ifdef __cplusplus From c2ea44481a21844c5097d364642bd7f93135485a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 16:39:34 +0000 Subject: [PATCH 9/9] Complete Windows build fix - all 4 issues resolved Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com> --- _codeql_detected_source_root | 1 + 1 file changed, 1 insertion(+) create mode 120000 _codeql_detected_source_root diff --git a/_codeql_detected_source_root b/_codeql_detected_source_root new file mode 120000 index 0000000..945c9b4 --- /dev/null +++ b/_codeql_detected_source_root @@ -0,0 +1 @@ +. \ No newline at end of file