Commit 49f21220 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot
Browse files

Merge topic 'support_frozen_python'

e88e1a4c

 Support Python with frozen modules.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3646
parents 0fbcab87 e88e1a4c
Pipeline #83124 failed with stage
in 0 seconds
......@@ -533,6 +533,14 @@ void vtkPythonInterpreter::SetupPythonPrefix()
{
using systools = vtksys::SystemTools;
// Check Py_FrozenFlag global variable defined by Python to see if we're using
// frozen Python.
if (Py_FrozenFlag)
{
VTKPY_DEBUG_MESSAGE("`Py_FrozenFlag` is set. Skipping setting up of program path.");
return;
}
if (Py_GetPythonHome() != nullptr)
{
// if PYTHONHOME is set, we do nothing. Don't override an already
......@@ -583,6 +591,14 @@ void vtkPythonInterpreter::SetupPythonPrefix()
//----------------------------------------------------------------------------
void vtkPythonInterpreter::SetupVTKPythonPaths()
{
// Check Py_FrozenFlag global variable defined by Python to see if we're using
// frozen Python.
if (Py_FrozenFlag)
{
VTKPY_DEBUG_MESSAGE("`Py_FrozenFlag` is set. Skipping locating of `vtk` package.");
return;
}
using systools = vtksys::SystemTools;
std::string vtklib = vtkGetLibraryPathForSymbol(GetVTKVersion);
if (vtklib.empty())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment