Skip to content

Fix abi3t detection on Windows - #1428

Merged
wjakob merged 1 commit into
wjakob:masterfrom
burgholzer:codex/honor-py-target-abi3t
Sep 2, 2026
Merged

Fix abi3t detection on Windows#1428
wjakob merged 1 commit into
wjakob:masterfrom
burgholzer:codex/honor-py-target-abi3t

Conversation

@burgholzer

@burgholzer burgholzer commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

scikit-build-core currently cannot encode abi3t in SKBUILD_SOABI on Windows because Stable ABI extensions use the untagged .pyd suffix. It sets Py_TARGET_ABI3T=1 instead.
See https://github.com/scikit-build/scikit-build-core/blob/5687cc3a0a6a085f87b3f378d3ed1dfdae2d544e/src/scikit_build_core/builder/builder.py#L447-L455

nanobind currently ignores that setting, leaves NB_ABI empty, and disables the requested FREE_THREADED split path.
This PR changes the configuration so that Py_TARGET_ABI3T is honored when deriving NB_ABI.

Assisted-by: gpt-5.6-sol with Codex

(This change was prompted by us having to work around this in one of our projects; see https://github.com/munich-quantum-toolkit/core/blob/970b79a55c9fd355df5fa4a9eb8c0c029fa0a733/cmake/AddMQTPythonBinding.cmake#L13-L17)

scikit-build-core cannot encode abi3t in SKBUILD_SOABI on Windows and instead sets Py_TARGET_ABI3T. Honor that signal when deriving NB_ABI so split builds take the existing abi3t path.

Exercise the fallback on Linux and Windows in split CI.

Assisted-by: Codex
@wjakob
wjakob merged commit 2384755 into wjakob:master Sep 2, 2026
41 checks passed
@wjakob

wjakob commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants