From bf4534b80f6ffb747fd894167ba3c11f7b10a41a Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 14 Jun 2026 14:29:54 +0000 Subject: [PATCH] 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"]