From f7c29c3c4283881a00c2b5febb06176715185fd5 Mon Sep 17 00:00:00 2001 From: Transurgeon Date: Mon, 13 Jul 2026 14:35:37 -0400 Subject: [PATCH] Use a persistent scikit-build build-dir to fix Windows tempdir cleanup flake python -m build intermittently fails on windows-2022 CI runners with PermissionError [WinError 32] while cleaning up scikit-build-core's TemporaryDirectory build dir (a lingering mspdbsrv.exe/AV handle holds files in Temp). The wheel itself builds fine; only the cleanup fails. Setting build-dir to a persistent, gitignored location skips the temporary directory entirely, so there is no cleanup to race with. Also gives incremental rebuilds locally. Co-Authored-By: Claude Fable 5 --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 4d82418..02ae584 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,3 +17,6 @@ content-type = "text/markdown" [tool.scikit-build] cmake.version = ">=3.15" wheel.packages = ["sparsediffpy"] +# Persistent build dir: avoids scikit-build-core's TemporaryDirectory, whose cleanup +# intermittently fails on Windows CI with WinError 32 (lingering mspdbsrv/AV handle). +build-dir = "build/{wheel_tag}"