Comment # 2 on bug 1084281 from
(In reply to Simon Lees from comment #1)
> Can you give me a link to your CMakeLists.txt, all this patch does is
> removes the assumption that  /usr/bin/python is the default python
> interpreter and instead looks for a python version that meets the
> constraints from newest to oldest. The reason behind this is in openSUSE,
> python3 is the default but we have decided not to change /usr/bin/python to
> python3 for reasons instead we encorage everyone to either use
> /usr/bin/python2 /usr/bin/python3 rather then /usr/bin/python, reverting the
> patch fixes it for you because then cmake looks for /usr/bin/python first
> which is python2 rather then python3. It looks like cmake rightly presumes
> that 3.6.4 is a higher number then 2.7.

Indeed. Here's the CMakeLists.txt :
https://cgit.kde.org/cantor.git/tree/src/backends/CMakeLists.txt

> 
> From reading FindPythonInterp I recommend you look at the following.
> 
> # The Python_ADDITIONAL_VERSIONS variable can be used to specify a list
> # of version numbers that should be taken into account when searching
> # for Python.  You need to set this variable before calling
> # find_package(PythonInterp).

That's what cantor does already:
set(Python_ADDITIONAL_VERSIONS 2.7)
find_package(PythonLibs 2.7)

> 
> I suspect you just want to set that variable to 2.7 (you could list
> additional python2 versions here as well if people are actually still using
> any others)

The patch causes another issue: if python2 isn't installed (it's optional) but
python3 is, CMake will assume both were found.


You are receiving this mail because: