From 03721bce38a4a90e85e10b5957d3966d9c26daee Mon Sep 17 00:00:00 2001 From: Alex Liberzon Date: Thu, 19 Feb 2026 10:09:30 +0200 Subject: [PATCH 1/7] Enhance Windows build setup for scipy-openblas Updated Windows build configuration for cibuildwheel to include scipy-openblas and adjust environment variables for LAPACK libraries. --- pyproject.toml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a6b1a04..f177bb0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,6 @@ build-backend = "setuptools.build_meta" name = "easysba" version = "0.1.0" description = "Python bindings for easySBA" -readme = "README.md" requires-python = ">=3.11" dependencies = ["numpy>=1.20"] @@ -14,6 +13,8 @@ dependencies = ["numpy>=1.20"] build-frontend = "build" skip = "*-musllinux* *-win32" test-skip = "*" + +# Default environment for Linux environment = { EASYSBA_LAPACK_LIBS = "openblas" } [tool.cibuildwheel.linux] @@ -22,14 +23,12 @@ before-all = "yum -y install openblas-devel lapack-devel" [tool.cibuildwheel.macos] environment = { EASYSBA_USE_ACCELERATE = "1", EASYSBA_LAPACK_LIBS = "" } -# [tool.cibuildwheel.windows] -# environment = { EASYSBA_LAPACK_LIBS = "openblas" } - [tool.cibuildwheel.windows] -# Install delvewheel to bundle the DLL into the wheel -before-build = "pip install delvewheel" -repair-wheel-command = "delvewheel repair --add-path C:\\vcpkg\\installed\\x64-windows\\bin -w {dest_dir} {wheel}" +# 1. Install scipy-openblas (the lib) and delvewheel (to bundle the DLL) +before-build = "pip install scipy-openblas delvewheel" + +# 2. Extract paths from scipy-openblas and set them for the compiler +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" } -[tool.cibuildwheel.windows.environment] -# Match the filename vcpkg actually produces: libopenblas -EASYSBA_LAPACK_LIBS = "libopenblas" +# 3. Repair the wheel: this bundles openblas.dll into the .whl file +repair-wheel-command = "delvewheel repair --add-path $(python -c \"import scipy_openblas; print(scipy_openblas.get_lib_dir())\") -w {dest_dir} {wheel}" From 63613a30b748b6ac77d24e0c9d70f35e1a30372e Mon Sep 17 00:00:00 2001 From: Alex Liberzon Date: Thu, 19 Feb 2026 10:10:08 +0200 Subject: [PATCH 2/7] Simplify CI workflow by removing redundant steps Removed unnecessary steps for macOS and Windows in CI workflow. --- .github/workflows/cibuildwheel.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index c9e3ed7..da238fd 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -22,34 +22,10 @@ jobs: with: python-version: "3.11" - - name: Install dependencies (macOS) - if: runner.os == 'macOS' - run: | - brew install uv - - - name: Cache vcpkg - if: runner.os == 'Windows' - uses: actions/cache@v4 - with: - path: C:\\vcpkg\\installed - key: vcpkg-openblas-${{ runner.os }} - - name: Install cibuildwheel run: python -m pip install --upgrade pip cibuildwheel - name: Build wheels - env: - CIBW_ENVIRONMENT_MACOS: EASYSBA_USE_ACCELERATE=1 EASYSBA_LAPACK_LIBS= - # Use the pre-installed vcpkg location for speed and reliability - CIBW_BEFORE_ALL_WINDOWS: >- - vcpkg install openblas:x64-windows - - CIBW_ENVIRONMENT_WINDOWS: >- - EASYSBA_LAPACK_LIBS="libopenblas" - EASYSBA_INCLUDE_DIRS="C:/vcpkg/installed/x64-windows/include" - EASYSBA_LIBRARY_DIRS="C:/vcpkg/installed/x64-windows/lib" - INCLUDE="C:/vcpkg/installed/x64-windows/include;$INCLUDE" - LIB="C:/vcpkg/installed/x64-windows/lib;$LIB" run: python -m cibuildwheel --output-dir wheelhouse - name: Upload wheels From 2d749e7577af557cf5828203eaabcd14c7a8b08c Mon Sep 17 00:00:00 2001 From: Alex Liberzon Date: Thu, 19 Feb 2026 10:16:37 +0200 Subject: [PATCH 3/7] Enhance cibuildwheel installation with dependencies Updated the cibuildwheel installation step to include build dependencies. --- .github/workflows/cibuildwheel.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index da238fd..d755dc1 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -22,8 +22,14 @@ jobs: with: python-version: "3.11" - - name: Install cibuildwheel - run: python -m pip install --upgrade pip cibuildwheel + - 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 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse From e608e37f9f3905f5cf1aa0dc980735ad99a82cd1 Mon Sep 17 00:00:00 2001 From: Alex Liberzon Date: Thu, 19 Feb 2026 10:17:32 +0200 Subject: [PATCH 4/7] Update cibuildwheel configuration for Windows Refactor Windows environment setup for cibuildwheel. --- pyproject.toml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f177bb0..b92ac69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,11 +24,16 @@ before-all = "yum -y install openblas-devel lapack-devel" environment = { EASYSBA_USE_ACCELERATE = "1", EASYSBA_LAPACK_LIBS = "" } [tool.cibuildwheel.windows] -# 1. Install scipy-openblas (the lib) and delvewheel (to bundle the DLL) +# 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" -# 2. Extract paths from scipy-openblas and set them for the compiler -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" } +[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" -# 3. Repair the wheel: this bundles openblas.dll into the .whl file +[tool.cibuildwheel.windows.repair-wheel-command] +# Use the repair-wheel-command to bundle the DLL repair-wheel-command = "delvewheel repair --add-path $(python -c \"import scipy_openblas; print(scipy_openblas.get_lib_dir())\") -w {dest_dir} {wheel}" From 0d52a88d3d332b02347a0b94a8b802beb66674d7 Mon Sep 17 00:00:00 2001 From: Alex Liberzon Date: Thu, 19 Feb 2026 10:17:57 +0200 Subject: [PATCH 5/7] Update pyproject.toml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b92ac69..e2fab26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,4 +36,4 @@ LIB = "$(python -c \"import scipy_openblas; print(scipy_openblas.get_lib_dir())\ [tool.cibuildwheel.windows.repair-wheel-command] # Use the repair-wheel-command to bundle the DLL -repair-wheel-command = "delvewheel repair --add-path $(python -c \"import scipy_openblas; print(scipy_openblas.get_lib_dir())\") -w {dest_dir} {wheel}" +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}" From 6105cd99ddba4e7a6e161cb4841fae608876853b Mon Sep 17 00:00:00 2001 From: Alex Liberzon Date: Thu, 19 Feb 2026 10:18:07 +0200 Subject: [PATCH 6/7] Update pyproject.toml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index e2fab26..f87603b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,7 @@ build-backend = "setuptools.build_meta" name = "easysba" version = "0.1.0" description = "Python bindings for easySBA" +readme = "README.md" requires-python = ">=3.11" dependencies = ["numpy>=1.20"] From b4b7546ca00fdcc14b395d5aa98c3ad699a3bc7b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 08:18:24 +0000 Subject: [PATCH 7/7] Initial plan