[cmake-developers] Find module for Python3

Laszlo Papp lpapp at kde.org
Sat Apr 7 15:23:47 EDT 2012


Hey,

I am now really wondering why Python3 has never been supported so far.
At least, I cannot make that version of python work at the moment. We
have switched to Python3 in the KDE Windows project, and some projects
are not building because of the FindPythonInterpreter.cmake file.

It has hard coded versions, like:
set(_Python_VERSIONS
  ${Python_ADDITIONAL_VERSIONS}
  2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)

At least on Windows, it works like this:
PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]

This is valid regedit entry also for the Python3 series.

It would not be too much of an effort to add the versions 3.1 and 3.2
as well, or just provide a new find module. Whatever fits better; I am
a newbie after all. We have now a GSoC project in KDE built on top of
Telepathy and it would be really cool if my student can finally
deliver the project also on Windows. I know we could use a local hack,
but I am now also proposing to have that feature supported in upstream
(cmake project) as well.

What do you think ?

Best Regards,
Laszlo Papp



More information about the cmake-developers mailing list