Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5d1b6054 authored by Francis Herne's avatar Francis Herne

[cmake] Tweaks to Python version usage.

Don't require the patch version to match between interpreter and libs.
The patch version only matters to ensure libs are > 3.4.3; just having
 the same feature release should be fine for other purposes.

Incidentally, fix definition of PYTHON_EXECUTABLE.
parent 96bcde04
......@@ -42,14 +42,14 @@ endforeach()
# Must unset before searching for libs, otherwise these are checked before the required version...
unset(Python_ADDITIONAL_VERSIONS)
if ( PYTHONINTERP_FOUND AND PYTHON_VERSION_STRING VERSION_GREATER "3.4.2" )
if ( PYTHONINTERP_FOUND AND PYTHON_VERSION_STRING VERSION_GREATER "3.4" )
# Find libraries that match the found interpreter (mismatched versions not supported).
# This assumes libs are available for the newest Python version on the system.
# KDevelop should _always_ be built against the newest possible version, so notabug.
find_package(PythonLibs "${PYTHON_VERSION_STRING}" REQUIRED EXACT)
find_package(PythonLibs "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" REQUIRED EXACT)
endif()
if ( NOT PYTHONLIBS_FOUND )
if ( NOT PYTHONLIBS_FOUND OR PYTHONLIBS_VERSION_STRING VERSION_LESS "3.4.3" )
message(FATAL_ERROR "Python >= 3.4.3 but < 3.7 with --enable-shared is required to build kdev-python")
endif()
......
......@@ -23,6 +23,6 @@
#define PYTHON_VERSION_MAJOR_STR "@PYTHON_VERSION_MAJOR@"
#define PYTHON_VERSION QT_VERSION_CHECK(@PYTHON_VERSION_MAJOR@, @PYTHON_VERSION_MINOR@, @PYTHON_VERSION_PATCH@)
#define PYTHON_VERSION_STR "@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@"
#define PYTHON_EXECUTABLE "@PYTHON_EXEC@"
#define PYTHON_EXECUTABLE "@PYTHON_EXECUTABLE@"
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment