<div dir="ltr"><div>Hi Folks,</div><div><br></div><div>I would really like some input from those familiar with how Python is found and wrapped on VTK.</div><div><br></div><div>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.</div><div><br></div><div>My thinking is that instead of just modifying the VTK version it would be better to just use the CMake version.</div><div><br></div><div>What I think happens is that during the configuration process:</div><div>1) In the top-level CMakeLists.txt - PythonInterp is found.</div><div>2) ... groups and dependencies set up and defined ...</div><div>3) Utilities/Python/CMakeLists.txt - including vtkWrapPython</div><div>vtkWrapPython.cmake</div><div>FindPythonLibs</div><div>Found PythonInterp: C:/Users/amaclean/Anaconda/python.exe (found version "2.7.8") </div><div>Found PythonInterp: C:/Users/amaclean/Anaconda/python.exe (found suitable version "2.7.8", minimum required is "2") </div><div>4) ... HDF5 stuff ...</div><div>5) vtkPythonWrapping.cmake</div><div> FindPythonLibs</div><div> Not building mpi4py on Windows (not supported currently).</div><div> vtkPythonWrapping.cmake</div><div> FindPythonLibs</div><div> vtkWrapPython.cmake</div><div> FindPythonLibs</div><div><br></div><div>Can someone explain why there has to be so many calls to FindPythonLibs?</div><div>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?</div><div><br></div><div>It is clear that</div><div>./CMake/vtkPythonWrapping.cmake</div><div>./CMake/vtkWrapPython.cmake</div><div>both call FindPythonLibs which may also be redundant.</div><div><br></div><div>I am working on a branch to do this so any input from the original writers would be appreciated.</div><div>It would also be really appreciated if they would act as reviewers.</div><div><br></div><div>Regards</div><div> Andrew</div><div><br></div><div><br></div>-- <br><div class="gmail_signature">___________________________________________<br>Andrew J. P. Maclean<br><br>___________________________________________</div>
</div>