Hi all,
We have an update on VTK_PYTHON_OPTIONAL_LINK.
To summarize the issue. Recently conda linked python3 statically, so all python symbols are included in the executable instead of being brought in by libpython. This created a problem with VTK used from python, because VTK links with libpython (it uses matplotlib for math text). So, you had python code brought in by the pyhton executable and by libpyton which resulted in a segfault for tests that used python and math text.
In the new module system, with Ben’s work, there is an option called VTK_PYTHON_OPTIONAL_LINK that is disabled by default. Patching VTK to enable this option and using cmake >= 3.13 would enable this option and compile VTK so that it works correctly with a python statically linked with libpython.
The reason why this option is still disable is that it does not work correctly with ParaView libraries because (we believe) more cleanup is needed there.
However, I used the patch VTK in our project using conda and statically linked python3 it works correctly.
Dan