InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.37k stars 660 forks source link

COMP: Fix python wrapping build state to match python version #4714

Closed hjmjohnson closed 2 weeks ago

hjmjohnson commented 3 weeks ago

If initially configured with python >= 3.11 before selecting a python version <3.11 as the python environment, then the state of the ITK_USE_PYTHON_LIMITED_API was incorrectly cached to retain the compiler settings desired for building with the original 3.11 python version.

Py_buffer is only included as part of the limited Python API in 3.11 or greater versions.

Compilation would fail due to building with -DPy_LIMITED_API to restrict the Python interfaces available.

PR Checklist