Skip to content

Commit

Permalink
COMP: Do not use ITK_AUTOLOAD_PATH when ITK_WRAP_PYTHON is set
Browse files Browse the repository at this point in the history
For the use case of Slicer using ITK Python wheels, ITK_AUTOLOAD_PATH
is set, and the Python wheel binaries will load the Slicer ITK binaries,
which will cause a crash.

Dynamic loading in Python is unnecessary and can be performed in a more
explicit and controlled manner by Python scripting, so disable this
feature by default when ITK_WRAP_PYTHON is set.
  • Loading branch information
thewtex committed Mar 24, 2022
1 parent c00f18a commit add2e72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/Core/Common/src/itkObjectFactoryBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ ObjectFactoryBase::Initialize()
m_PimplGlobals->m_Initialized = true;
ObjectFactoryBase::InitializeFactoryList();
ObjectFactoryBase::RegisterInternal();
#ifdef ITK_DYNAMIC_LOADING
#if !defined(ITK_DYNAMIC_LOADING) && !defined(ITK_WRAPPING)
ObjectFactoryBase::LoadDynamicFactories();
#endif
}
Expand Down

0 comments on commit add2e72

Please sign in to comment.