Skip to content

Commit 9667d49

Browse files
Transurgeonclaude
andcommitted
skip BLAS and dense_matrix on Windows (matches C engine)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 32c0c67 commit 9667d49

2 files changed

Lines changed: 8 additions & 21 deletions

File tree

.github/workflows/build-and-publish.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,6 @@ jobs:
5757
with:
5858
platforms: all
5959

60-
- name: Cache vcpkg packages
61-
if: runner.os == 'Windows'
62-
uses: actions/cache@v4
63-
with:
64-
path: C:\vcpkg\installed
65-
key: vcpkg-windows-openblas-v1
66-
6760
- name: Build wheels
6861
uses: pypa/cibuildwheel@v3.3.0
6962
env:
@@ -72,9 +65,6 @@ jobs:
7265
CIBW_ARCHS_MACOS: "x86_64 universal2"
7366
CIBW_ARCHS_LINUX: "auto aarch64"
7467
CIBW_BEFORE_BUILD_LINUX: "yum install -y openblas-devel || apt-get install -y libopenblas-dev"
75-
CIBW_BEFORE_BUILD_WINDOWS: "vcpkg install openblas:x64-windows && dir C:\\vcpkg\\installed\\x64-windows\\include\\ && dir C:\\vcpkg\\installed\\x64-windows\\lib\\"
76-
CIBW_ENVIRONMENT_WINDOWS: "VCPKG_INSTALLED_DIR=C:/vcpkg/installed/x64-windows"
77-
7868
- name: Check wheels
7969
shell: bash
8070
run: |

setup.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,13 @@ def finalize_options(self) -> None:
3636

3737

3838
# Collect all C source files from SparseDiffEngine
39+
_exclude = {"dnlp_diff_engine"}
40+
if system == "windows":
41+
_exclude.add("dense_matrix")
42+
3943
diff_engine_sources = [
4044
s for s in glob.glob("SparseDiffEngine/src/**/*.c", recursive=True)
41-
if "dnlp_diff_engine" not in s
45+
if not any(ex in s for ex in _exclude)
4246
] + ["sparsediffpy/_bindings/bindings.c"]
4347

4448
# Define _POSIX_C_SOURCE on Linux for clock_gettime and struct timespec
@@ -54,16 +58,9 @@ def finalize_options(self) -> None:
5458
blas_link_args = ["-lopenblas"]
5559
blas_include_dirs = ["/usr/include/openblas"]
5660
else:
57-
# Windows: OpenBLAS via vcpkg
58-
vcpkg_root = os.environ.get(
59-
"VCPKG_INSTALLED_DIR",
60-
r"C:\vcpkg\installed\x64-windows",
61-
)
62-
blas_link_args = [os.path.join(vcpkg_root, "lib", "openblas.lib")]
63-
blas_include_dirs = [
64-
os.path.join(vcpkg_root, "include"),
65-
os.path.join(vcpkg_root, "include", "openblas"),
66-
]
61+
# Windows: no BLAS available
62+
blas_link_args = []
63+
blas_include_dirs = []
6764

6865
sparsediffengine = Extension(
6966
"sparsediffpy._sparsediffengine",

0 commit comments

Comments
 (0)