[vtk-developers] Do we really need the VTK version of FindPythonLibs.cmake?

Andrew Maclean andrew.amaclean at gmail.com
Thu Mar 19 00:30:09 EDT 2015


Hi Folks,

I would really like some input from those familiar with how Python is found
and wrapped on VTK.

I came across a problem where FindPythonLibs.cmake [the VTK version] cannot
find the python include directory or the python lib. However the CMake
version seems to work OK. This happens if Python is installed in a users
directory and not a system directory.

My thinking is that instead of just modifying the VTK version it would be
better to just use the CMake version.

What I think happens is that during the configuration process:
1) In the top-level CMakeLists.txt - PythonInterp is found.
2) ... groups and dependencies set up and defined ...
3) Utilities/Python/CMakeLists.txt - including vtkWrapPython
vtkWrapPython.cmake
FindPythonLibs
Found PythonInterp: C:/Users/amaclean/Anaconda/python.exe (found version
"2.7.8")
Found PythonInterp: C:/Users/amaclean/Anaconda/python.exe (found suitable
version "2.7.8", minimum required is "2")
4) ... HDF5 stuff ...
5) vtkPythonWrapping.cmake
   FindPythonLibs
   Not building mpi4py on Windows (not supported currently).
   vtkPythonWrapping.cmake
   FindPythonLibs
   vtkWrapPython.cmake
   FindPythonLibs

Can someone explain why there has to be so many calls to FindPythonLibs?
One oddity that you can see above is that ./Utilities/Python/CMakeLists.txt
calls vtkWrapPython only to call FindPythonLibs. Which makes me think that:
Is it safe, in the top-level CMakeLists.txt to do the FindPythonLibs just
the once?

It is clear that
./CMake/vtkPythonWrapping.cmake
./CMake/vtkWrapPython.cmake
both call FindPythonLibs which may also be redundant.

I am working on a branch to do this so any input from the original writers
would be appreciated.
It would also be really appreciated if they would act as reviewers.

Regards
   Andrew


-- 
___________________________________________
Andrew J. P. Maclean

___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150319/2d2abf1b/attachment.html>


More information about the vtk-developers mailing list