Skip to content

Draft: Improve vtkPythonInterpreter::SetupPythonPrefix

Ghost User requested to merge (removed):ExecutableImprovements into master

This commit improves vtkPythonInterpreter::SetupPythonPrefix by:

  • fixing how the path is computed. In current binaries, it is broken: see #18255
>>> import sys
>>> sys.executable
'/mnt/disk2/opt/ParaView-5.9.1-MPI-Linux-Python3.8-64bit/bin/../lib/vtkpython'
  • make sure the guessed executable file actually exists. If it doesn't, just ignore it (at least don't call Py_SetProgramName with a path that doesn't exist). This way libraries that need a valid sys.executable
  • doesn't set the executable name ("vtkpython") in stone but allow to change the name of the executable... Will be useful for pvpython and pvbatch (future PR on paraview/paraview...)
Edited by Ghost User

Merge request reports