[CMake] patch proposal for PythonInterp

Yngve Inntjore Levinsen yngve.levinsen at gmail.com
Thu Mar 21 06:03:38 EDT 2013


Hi,

I have a suggestion for the PythonInterp. On a system I am compiling my
code on, I need to find the python binary which is newer than 2.5.
However, the default /usr/bin/python is 2.4.

If I then set the variable (which is not documented in the header by the
way) PythonInterp_FIND_VERSION to 2.5, it will first search for the
following list of binary names:
    python2.5 python2 python.

It then finds python2 (and would find python) which points to python2.4.
I do not have python2.5 on this system, only 2.6.

Now I know my way around this myself, but I think the implementation of
this script would be nicer with the attached patch. The list of binary
names in the first search then becomes:
    python2.5 python2.7 python2.6 python2.5 python2 python

Any comments? Do people agree? Am I missing some important reason for
the current behaviour?

Cheers,
Yngve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python_interp.patch
Type: text/x-patch
Size: 1260 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130321/d19b9ef5/attachment.bin>


More information about the CMake mailing list