On 1/17/2012 1:50 PM, Rolf Eike Beer wrote:
Commit 20980ef56a847fec7922983257fd5be467b689bd changed the FindPythonInterp
For reference: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20980ef5
Today a user was in #cmake that had a system default python that was some 3.x version, and therefore /usr/bin/python was a symlink to /usr/bin/python3. The current module has no possiblity for a developer to specify that FindPythonInterp should search for python2 first. So I wrote the attached patch which allow the developer to say that a python2 or python3 major version should be preferred. This is actually a bit hacky, but nevertheless "works for him"(tm).
[snip] > +# You may specify either PYTHONINTERP_PREFER_PYTHON2 or > +# PYTHONINTERP_PREFER_PYTHON3 to tell the module to probe for a specific > +# python major version first. Can this use the version argument to find_package? If a project's python code works only with 2 or only with 3 why bother even looking for other versions? -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers