Salome HOME
Ensure cmake_build_type is used in SALOME 9.12.0
[tools/sat_salome.git] / products / patches / paraview-5.11.0.p0011-add_dll_directory.patch
1 --- ParaView-5.11.0_ref/VTK/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx        2022-11-18 15:26:55.000000000 +0100
2 +++ ParaView-5.11.0_new/VTK/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx        2024-04-18 14:25:32.000000000 +0200
3 @@ -830,25 +830,6 @@
4    // the issue.
5    if (!vtkdir.empty())
6    {
7 -#if PY_VERSION_HEX >= 0x03080000
8 -    vtkPythonScopeGilEnsurer gilEnsurer(false, true);
9 -    CloseDLLDirectoryCookie();
10 -    PyObject* os = PyImport_ImportModule("os");
11 -    if (os)
12 -    {
13 -      PyObject* add_dll_directory = PyObject_GetAttrString(os, "add_dll_directory");
14 -      if (add_dll_directory && PyCallable_Check(add_dll_directory))
15 -      {
16 -        PyObject* newpath = PyUnicode_FromString(vtkdir.c_str());
17 -        DLLDirectoryCookie = PyObject_CallFunctionObjArgs(add_dll_directory, newpath, nullptr);
18 -        Py_XDECREF(newpath);
19 -      }
20 -
21 -      Py_XDECREF(add_dll_directory);
22 -    }
23 -
24 -    Py_XDECREF(os);
25 -#else
26      std::string env_path;
27      if (systools::GetEnv("PATH", env_path))
28      {
29 @@ -859,7 +840,6 @@
30        env_path = vtkdir;
31      }
32      systools::PutEnv(std::string("PATH=") + env_path);
33 -#endif
34    }
35  #endif
36