<div dir="ltr">Hi David,<div>   Thanks for getting back so fast ... what time was it where you are? I am in no hurry, so take your time and have a good look at the code!</div><div><br></div><div>All these questions arose because I did a gerrit submission, (now abandoned because I thought it would be a good idea to wait for GitLab to be up and running): <a href="http://review.source.kitware.com/#/c/19474/">http://review.source.kitware.com/#/c/19474/</a></div><div>These changes worked but on thinking about it they raised a lot of questions, hence the email.</div><div><br></div><div>I did consider just a change to the VTK version of <span style="font-size:12.8000001907349px">FindPythonLibs.cmake but then I found the CMake version worked quite well. The abandoned topic built Ok on the test machines and Windows.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">In response to your points:</span></div><div><span style="font-size:12.8000001907349px">2) I agree that the synchronization with CMake should be better!</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">1) It is strange that there exist </span><span style="font-size:12.8000001907349px">FindPythonLibs.cmake and FindPythonInterp.cmake but I guess it may be historical. A </span><span style="font-size:12.8000001907349px">FindPython.cmake would be more intuitive. You can emulate this by doing a:</span></div><div><span style="font-size:12.8000001907349px">find_package(PythonInterp ${VTK_PYTHON_VERSION})</span><br></div><div><span style="font-size:12.8000001907349px">find_package(PythonLibs </span><span style="font-size:12.8000001907349px">${VTK_PYTHON_VERSION}</span><span style="font-size:12.8000001907349px">)</span></div><div><span style="font-size:12.8000001907349px">Which leads to point 3:</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">3)  I think the problem here is that in the VTK stuff, all the finding of the Python Libs are done by:</span></div><div><span style="font-size:12.8000001907349px">find_package(PythonLibs)</span></div><div><span style="font-size:12.8000001907349px">note tha</span>t Python_ADDITIONAL_VERSIONS is not being used. I think these calls should be:<span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">find_package(PythonLibs </span><span style="font-size:12.8000001907349px">${VTK_PYTHON_VERSION}</span><span style="font-size:12.8000001907349px">) </span></div><div><span style="font-size:12.8000001907349px">this should fix the issue that python3 libs are being found when python (2) is needed.</span><br></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">It is interesting that the third party stuff all does this:</span></div><div><div style><span style="font-size:12.8000001907349px">FIND_PACKAGE(PythonInterp ${VTK_PYTHON_VERSION})</span></div><div style><span style="font-size:12.8000001907349px">FIND_PACKAGE(PythonLibs ${VTK_PYTHON_VERSION})</span></div></div><div style><span style="font-size:12.8000001907349px">Which raises the possibility that the third party lib versions could be different from the VTK versions!</span></div><div style><span style="font-size:12.8000001907349px"><br></span></div><div style><span style="font-size:12.8000001907349px">Anyway I think that if the python stuff can be streamlined an simplified that will be the best approach. So take your time and have a good look at the code! I can do a quick fix to </span><span style="font-size:12.8000001907349px">FindPythonLibs.cmake but there are deeper issues here.</span></div><div style><span style="font-size:12.8000001907349px"><br></span></div><div style><span style="font-size:12.8000001907349px">I am in no hurry!</span></div><div style><span style="font-size:12.8000001907349px"><br></span></div><div style><span style="font-size:12.8000001907349px">Regards</span></div><div style><span style="font-size:12.8000001907349px">   Andrew</span></div><div><br></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div></div>