VTK python tests fail after CMake 3.18.1 to 3.18.2 upgrade
I have several macOS bots that build and run VTK every night. I just tracked down that going from CMake 3.18.1 to 3.18.2 causes hundreds of VTK python tests to fail with:
Traceback (most recent call last):
File "/Users/builder/external/VTK/Utilities/vtkTclTest2Py/rtImageTest.py", line 12, in <module>
import vtk
File "/Users/builder/external/VTK-clang-dbg-x86_64/lib/python2.7/site-packages/vtk.py", line 9, in <module>
vtkmodules_m = importlib.import_module('vtkmodules')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/builder/external/VTK-clang-dbg-x86_64/lib/python2.7/site-packages/vtkmodules/__init__.py", line 15, in <module>
import _vtkmodules_static
ImportError: No module named _vtkmodules_static
Example: https://open.cdash.org/viewTest.php?onlyfailed&buildid=6911686
This still occurs with CMake 3.19.1 (current newest). It occurs on multiple versions of macOS. In all cases, I haven't installed python myself, so it'll be using the python 2.7 that comes with macOS.