You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python pixi build fails with INTERFACE_INCLUDE_DIRECTORIES error #5756
-- Configuring done (15.2s)
CMake Error in Modules/Bridge/NumPy/CMakeLists.txt:
Target "ITKBridgeNumPyModule" INTERFACE_INCLUDE_DIRECTORIES property
contains path:
"/home/matt/src/ITK/.pixi/envs/python/include/python3.13"
which is prefixed in the source directory.
Looking at the CMake code, I think this python path was hard coded into the installed ITK. So maybe it's only valid for the build?
Ideally the ITK::ITKNumpyModule would have an INTERFACE dependency on the imported target Python::Module or Python::SABIModule. This should produce a portable configuration. However, would likely need to be part of a larger refactor to use the import Python interface.
Given that this path previously generated in the install was invalid here are a couple options:
Use the $<BUILD_INTERFACE: > generator expression in the Numpy module.
Ensure the pixi environment is not created in the source directory. This just side steps the underlying issue.
Ideally the ITK::ITKNumpyModule would have an INTERFACE dependency on the imported target Python::Module or Python::SABIModule. This should produce a portable configuration. However, would likely need to be part of a larger refactor to use the import Python interface.
And we do have an exceptional case with libpython where we are weakly linking.
Ensure the pixi environment is not created in the source directory. This just side steps the underlying issue.
Yes; the pixi environment in the source directory is intentional.
Use the $<BUILD_INTERFACE: > generator expression in the Numpy module.
Activity
blowekamp commentedon Feb 3, 2026
Looking at the CMake code, I think this python path was hard coded into the installed ITK. So maybe it's only valid for the build?
Ideally the ITK::ITKNumpyModule would have an INTERFACE dependency on the imported target
Python::ModuleorPython::SABIModule. This should produce a portable configuration. However, would likely need to be part of a larger refactor to use the import Python interface.Given that this path previously generated in the install was invalid here are a couple options:
$<BUILD_INTERFACE: >generator expression in the Numpy module.pixienvironment is not created in the source directory. This just side steps the underlying issue.thewtex commentedon Feb 3, 2026
Yes
And we do have an exceptional case with libpython where we are weakly linking.
Yes; the pixi environment in the source directory is intentional.
👍 did you want to have copilot give this a try?
blowekamp commentedon Feb 4, 2026
@thewtex the merge of #5665 should have resolve this issue. Please test and close if resolved.
thewtex commentedon Feb 5, 2026
@blowekamp verified! Thank you!! 🙏