]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
bos #41189 - fix FIELD crash
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 18 Apr 2024 13:16:54 +0000 (15:16 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 18 Apr 2024 13:16:54 +0000 (15:16 +0200)
products/ParaView.pyconf
products/patches/paraview-5.11.0.p0011-add_dll_directory.patch [new file with mode: 0644]

index e82f5946777c043d09d86b999dd500685237803c..3ac69abb9ea5682b19685cd951fa390f0970973c 100755 (executable)
@@ -335,7 +335,8 @@ version_5_11_0_win :
                'paraview-5.11.0.p002-FindMPI.patch',
                'paraview-5.11.0.p004-vtkUniformHyperTreeGrid.patch',
                'paraview-5.11.0.p006-GIL.patch',
-               'paraview-5.11.0.p009-openturns-1.21.patch'
+               'paraview-5.11.0.p009-openturns-1.21.patch',
+               'paraview-5.11.0.p0011-add_dll_directory.patch'
               ]
 }
 
diff --git a/products/patches/paraview-5.11.0.p0011-add_dll_directory.patch b/products/patches/paraview-5.11.0.p0011-add_dll_directory.patch
new file mode 100644 (file)
index 0000000..48ccd3b
--- /dev/null
@@ -0,0 +1,36 @@
+--- ParaView-5.11.0_ref/VTK/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx       2022-11-18 15:26:55.000000000 +0100
++++ ParaView-5.11.0_new/VTK/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx       2024-04-18 14:25:32.000000000 +0200
+@@ -830,25 +830,6 @@
+   // the issue.
+   if (!vtkdir.empty())
+   {
+-#if PY_VERSION_HEX >= 0x03080000
+-    vtkPythonScopeGilEnsurer gilEnsurer(false, true);
+-    CloseDLLDirectoryCookie();
+-    PyObject* os = PyImport_ImportModule("os");
+-    if (os)
+-    {
+-      PyObject* add_dll_directory = PyObject_GetAttrString(os, "add_dll_directory");
+-      if (add_dll_directory && PyCallable_Check(add_dll_directory))
+-      {
+-        PyObject* newpath = PyUnicode_FromString(vtkdir.c_str());
+-        DLLDirectoryCookie = PyObject_CallFunctionObjArgs(add_dll_directory, newpath, nullptr);
+-        Py_XDECREF(newpath);
+-      }
+-
+-      Py_XDECREF(add_dll_directory);
+-    }
+-
+-    Py_XDECREF(os);
+-#else
+     std::string env_path;
+     if (systools::GetEnv("PATH", env_path))
+     {
+@@ -859,7 +840,6 @@
+       env_path = vtkdir;
+     }
+     systools::PutEnv(std::string("PATH=") + env_path);
+-#endif
+   }
+ #endif