kdev-python: finding the required Python library version via CMake

René J.V. Bertin rjvbertin at gmail.com
Wed Jun 24 20:19:21 BST 2015


Hi,

The CMake file for kdev-python/parser (v. 1.7.1.5) has the following blurb:

find_package(PythonLibs 3.4.3 REQUIRED)
if ( NOT ${PYTHONLIBS_FOUND} OR ${PYTHON_VERSION_MINOR} GREATER 4 )
    message(FATAL_ERROR "Python 3.4.3 with --enable-shared is required")
endif()

When building in the MacPorts environment under OS X, the only thing that did was picking up an old 2.4.3 (!) framework I'd installed as /Library/Frameworks/Python2.4.framework; after I removed that it stopped finding anything at all. Yet I have python2.7 and python3.4 installed under /opt/local (and in the path) along with all the other dependencies, and cmake itself. The only thing I could but shouldn't have to adapt is letting /opt/local/bin/python be a symlink to python3.4 instead of to python2.7 .

I had a comparable issue with `find_package(PythonInterp 3.0 required)` which I could resolve by hardcoding the PYTHON_EXECUTABLE variable, but I apparently one cannot pull a similar trick with the PythonLibs script.

Is the PythonLibs script supposed to work with multiple parallel python installs (and find the requested one), including on OS X?
Is there a clean way out of this situation?

In addition, what's with the "version 3.4.3 and nothing else" bit? Is that going to change?

Thanks,
R.




More information about the KDevelop mailing list