Python modules should not link to PYTHON_LIBRARY on OS X
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
VTK's importable Python modules are directly linked against PYTHON_LIBRARY on OS X. This means that importing them from a Python interpreter installed to a different location, even if it is fully compatible, will segfault the interpreter. This is a frequent source of crash reports in Homebrew.
If these modules were built with -undefined dynamic_lookup
in place of an explicit link to a Python library, these modules could be shared between compatible interpreters with impunity, which would make VTK much simpler to deploy on OS X and reduce the number of crash reports we receive.
I've written about this problem in greater detail at http://blog.tim-smith.us/2015/09/python-extension-modules-os-x/.
I spent an hour or so fiddling with VTK's CMake configuration and couldn't quickly produce the desired result so I haven't sent a pull request.
Please let me know if I can help. Thanks!