telepathy-qt: Update CMake Python version to 3

Alexandr Akulich kaffeine at kemper.freedesktop.org
Mon Sep 2 18:00:10 UTC 2019


Module: telepathy-qt
Branch: master
Commit: 8ca499dfff059546721255cbe04d2b40858b8c4d
URL:    http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=8ca499dfff059546721255cbe04d2b40858b8c4d

Author: Alexey Andreyev <aa13q at ya.ru>
Date:   Sun Mar 24 03:56:45 2019 +0300

Update CMake Python version to 3

---

 CMakeLists.txt | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a747207..096549b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -136,14 +136,10 @@ macro_log_feature(QT_GLIB_SUPPORT "Qt Glib Support"
 # reset flags
 set(CMAKE_REQUIRED_FLAGS "")
 
-# Find python version >= 2.7
-set(REQUIRED_PY 2.7)
-find_package(PythonLibrary ${REQUIRED_PY} REQUIRED)
-if(${PYTHON_SHORT_VERSION} VERSION_GREATER ${REQUIRED_PY} OR ${PYTHON_SHORT_VERSION} VERSION_EQUAL ${REQUIRED_PY})
-    message(STATUS "Python ${PYTHON_SHORT_VERSION} found")
-else()
-    message(SEND_ERROR "Python >= ${REQUIRED_PY} is required")
-endif()
+# Find python version >= 3
+find_package(Python3 REQUIRED)
+
+set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
 
 # Check for dbus-python
 execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import dbus.mainloop.glib"



More information about the telepathy-commits mailing list