Skip to content

Commit e3f6d0d

Browse files
committed
COMP: Omit Development.Module for limited API builds on Windows
When ITK_USE_PYTHON_LIMITED_API is ON, the second find_package(Python3) call no longer requests Development.Module. On Windows, satisfying Development.Module requires the version-specific python3XX.lib (e.g. python311.lib), which is absent in many environments such as Azure CI hosted agents and standard virtualenvs. ITKCommon already links against Python3::SABIModule (not Python3::Module) when ITK_USE_PYTHON_LIMITED_API is ON, so the Development.Module component and its Python3::Module target are not required in this path.
1 parent 7022660 commit e3f6d0d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

CMake/ITKSetPython3Vars.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ else()
109109
set(
110110
_python_find_components
111111
Interpreter
112-
Development.Module
112+
# Development.Module is intentionally omitted for limited API builds:
113+
# on Windows, it requires the version-specific python3XX.lib which is
114+
# absent in many environments (e.g., Azure CI hosted agents, venvs).
115+
# ITKCommon links Python3::SABIModule instead of Python3::Module when
116+
# ITK_USE_PYTHON_LIMITED_API is ON, so Development.Module is not needed.
113117
Development.SABIModule
114118
)
115119
else()

0 commit comments

Comments
 (0)