Skip to content

Commit 12f1368

Browse files
committed
COMP: Always pass USE_SABI to python3_add_library
The abi3 floor and the Python wrapping floor are both 3.11, so the non-SABI branch was unreachable for every supported interpreter.
1 parent 0e4b1a0 commit 12f1368

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

Wrapping/macro_files/itk_end_wrap_module.cmake

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -483,31 +483,17 @@ ${DO_NOT_WAIT_FOR_THREADS_CALLS}
483483
# build all the c++ files from this module in a common lib
484484
if(NOT TARGET ${lib})
485485
# -- START PYTHON MODULE CREATION
486-
if(ITK_USE_PYTHON_LIMITED_API)
487-
set(
488-
_Python3_ABI_SETTINGS
489-
USE_SABI
490-
${_ITK_MINIMUM_SUPPORTED_LIMITED_API_VERSION}
491-
WITH_SOABI
492-
)
493-
else()
494-
unset(_Python3_ABI_SETTINGS)
495-
endif()
496-
497486
#Python3_add_library sets PREFIX "" and the correct extension suffix automatically.
498487
# No manual SUFFIX editing is needed.
499-
#WITH_SOABI can be added to Python3_add_library(...) if you want the SOABI tag
500-
#in the filename for non-SABI builds.
501-
#Use Development.Module for normal CPython extensions. Use Development.SABIModule plus Py_LIMITED_API for abi3-compatible builds.
502488
python3_add_library(
503489
${lib}
504490
MODULE
505-
${_Python3_ABI_SETTINGS}
491+
USE_SABI ${_ITK_MINIMUM_SUPPORTED_LIMITED_API_VERSION}
492+
WITH_SOABI
506493
${cpp_file}
507494
${ITK_WRAP_PYTHON_CXX_FILES}
508495
${WRAPPER_LIBRARY_CXX_SOURCES}
509496
)
510-
unset(_Python3_ABI_SETTINGS)
511497
# Override the default naming convensions for libraries
512498
# and add an ITK python prefix of "_" for the generated names
513499
set_target_properties(

0 commit comments

Comments
 (0)