Bug 419237

Summary: kig's FindBoostPython.cmake does not find the py3 version of python-boost
Product: [Applications] kig Reporter: Luca Beltrame <lbeltrame>
Component: generalAssignee: David E. Narvaez <david.narvaez>
Status: RESOLVED FIXED    
Severity: normal CC: pino, wbauer1
Priority: NOR    
Version: 20.03.80   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 20.07.80

Description Luca Beltrame 2020-03-25 16:06:49 UTC
SUMMARY
As the summary says, the Python support in kig is disabled when only Python 3 is installed, because it is not found by its own FindBoostPython macro. 

STEPS TO REPRODUCE
1. Have a system with no boost-python for Python 2, but with boost-python for Python 3 installed
2. Run CMake in a checkout of the sources

OBSERVED RESULT

boost-python is not found and the Python bindings are disabled.

EXPECTED RESULT

boost-python is found and the Python bindings are enabled.

SOFTWARE/OS VERSIONS
KDE Frameworks Version: master
Qt Version: 5.14
Comment 1 Wolfgang Bauer 2020-03-27 11:45:34 UTC
It is found if you build it *without* -DBoost_NO_BOOST_CMAKE=ON.
But it needs a recent boost (1.70 I think).
Comment 2 Pino Toscano 2020-05-03 08:14:58 UTC
Git commit 1fdeff25f5f113f4567ab100da9df3f0f24c3ce8 by Pino Toscano.
Committed on 03/05/2020 at 08:08.
Pushed by pino into branch 'master'.

cmake: switch python & boost-python search to py3

Python 2 is EOL now, and Python 3 has been available in distros for
years already, so it is time to switch exclusively to Python 3.

The actual changes to the BoostPython module are:
- look for the python3 boost component (instead of python): while boost
  upstream does not provide it, most of the distros do; the alternative
  would be to look for the pythonXY components, which is not ideal...
- look for the python libraries >= 3, setting as additional versions
  for the cmake module all the non-EOL Python 3 versions
- set as Python versions for pkg-config all the non-EOL ones, using the
  embed version starting from Python 3.8 [1]

[1] https://bugs.python.org/issue36721
FIXED-IN: 20.07.80

M  +11   -9    cmake/modules/FindBoostPython.cmake

https://commits.kde.org/kig/1fdeff25f5f113f4567ab100da9df3f0f24c3ce8