Skip to content

Commit 10eafbc

Browse files
authored
fix(cmake): error if SKBUILD_SABI_VERSION set and too low (#978)
* fix(cmake): error if SKBUILD_SABI_VERSION set and too low Signed-off-by: Henry Schreiner <[email protected]> * Update cmake/nanobind-config.cmake --------- Signed-off-by: Henry Schreiner <[email protected]>
1 parent a570102 commit 10eafbc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmake/nanobind-config.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ elseif(DEFINED Python_SOSABI)
2626
set(NB_SOSABI "${Python_SOSABI}")
2727
endif()
2828

29+
30+
# Error if scikit-build-core is trying to build Stable ABI < 3.12 wheels
31+
if(DEFINED SKBUILD_SABI_VERSION AND SKBUILD_SABI_VERSION VERSION_LESS "3.12")
32+
message(FATAL_ERROR "You must set tool.scikit-build.wheel.py-api to 'cp312' or later when using scikit-build-core with nanobind.")
33+
endif()
34+
2935
# PyPy sets an invalid SOABI (platform missing), causing older FindPythons to
3036
# report an incorrect value. Only use it if it looks correct (X-X-X form).
3137
if(DEFINED NB_SOABI AND "${NB_SOABI}" MATCHES ".+-.+-.+")

0 commit comments

Comments
 (0)