From bf4534b80f6ffb747fd894167ba3c11f7b10a41a Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 14 Jun 2026 14:29:54 +0000 Subject: [PATCH 1/2] Fix macOS wheel build: set MACOSX_DEPLOYMENT_TARGET=10.14 cibuildwheel defaults the x86_64 macOS deployment target to 10.9, but nanobind's C++17 runtime uses aligned new/delete which requires macOS 10.13+. Every macOS wheel job failed to compile nanobind (nb_type.cpp: 'aligned deallocation function ... only available on macOS 10.13 or newer'). Pin the deployment target to 10.14 for the macOS builds. --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 41eb3cc9..0cb07840 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -125,6 +125,9 @@ test-command = 'python -c "import nns, nns._nnscore as c; print(c.lpm(2.0, 0.0, [tool.cibuildwheel.macos] archs = ["x86_64", "arm64"] +# nanobind's C++17 runtime uses aligned new/delete, which requires macOS 10.13+. +# cibuildwheel otherwise defaults x86_64 to 10.9 and the build fails to compile. +environment = { MACOSX_DEPLOYMENT_TARGET = "10.14" } [tool.cibuildwheel.windows] archs = ["AMD64"] From 89442bdd64a950bab2556b34fd09db37278a37f6 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 14 Jun 2026 14:50:46 +0000 Subject: [PATCH 2/2] Fix Linux wheel test: build on manylinux_2_28 cibuildwheel's default Linux image is manylinux2014 (glibc 2.17), but numpy/scipy only publish manylinux_2_27/_2_28 wheels. In the glibc 2.17 test container those wheels are incompatible, so pip falls back to compiling scipy from source, which needs OpenBLAS/Fortran that aren't present, and the wheel smoke-test fails. Our runtime deps already require glibc >= 2.27, so manylinux2014 wheels were never installable anyway. Build and test the x86_64 Linux wheels on manylinux_2_28 to match the dependencies' wheel floor. musllinux_1_2 (the cibuildwheel default) is pinned explicitly; it already has matching numpy/scipy wheels. --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 0cb07840..588f2e88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,6 +120,12 @@ mypy_path = ["tests"] build = "cp311-* cp312-* cp313-*" skip = ["pp*", "*_i686", "*-win32", "*-musllinux_i686"] build-frontend = "build" +# Build/test on glibc 2.28: numpy/scipy only publish manylinux_2_27/_2_28 wheels, +# so the default manylinux2014 (glibc 2.17) test image cannot install them and +# falls back to compiling scipy from source (no OpenBLAS) and fails. musllinux_1_2 +# (the cibuildwheel default) already has matching numpy/scipy wheels. +manylinux-x86_64-image = "manylinux_2_28" +musllinux-x86_64-image = "musllinux_1_2" # Smoke-test every built wheel: the native extension imports and computes. test-command = 'python -c "import nns, nns._nnscore as c; print(c.lpm(2.0, 0.0, [-2.0, -1.0, 0.5, 3.0]))"'