Salome HOME
Update Thirt-patry product versions and configuration options.
[tools/configuration.git] / config / patches / paraview.001_against_multiple_py_sv_thr.patch
diff --git a/config/patches/paraview.001_against_multiple_py_sv_thr.patch b/config/patches/paraview.001_against_multiple_py_sv_thr.patch
new file mode 100644 (file)
index 0000000..33059a2
--- /dev/null
@@ -0,0 +1,17 @@
+diff -ruN ParaView/VTK/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx ParaView_new/VTK/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx
+--- ParaView/VTK/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx  2019-05-28 08:19:55.673481437 +0200
++++ ParaView_new/VTK/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx      2019-05-28 08:08:21.000000000 +0200
+@@ -260,8 +260,11 @@
+     vtkPythonInterpreter::InitializedOnce = true;
+ #ifdef VTK_PYTHON_FULL_THREADSAFE
+-    PyEval_InitThreads(); // safe to call this multiple time
+-    PyEval_SaveThread(); // release GIL
++    if(PyEval_ThreadsInitialized() == 0)
++    {
++      PyEval_InitThreads(); // safe to call this multiple time
++      PyEval_SaveThread(); // release GIL
++    }
+ #endif
+     // HACK: Calling PyRun_SimpleString for the first time for some reason results in