[qgis] 05/05: Add patch to not require Python 3 for Qt5.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sun Mar 13 13:57:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch qt5
in repository qgis.

commit 71f57790ae5fdf5d96a4d7e580bc7f60845116f2
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Mar 12 21:44:56 2016 +0100

    Add patch to not require Python 3 for Qt5.
    
    Also support PyQt5 path for uic widget plugin.
    
    Re-enable bindings.
---
 debian/changelog                   |  1 +
 debian/libqgis-dev.install         |  2 +-
 debian/libqgispython2.14.0.install |  2 +-
 debian/patches/qt5-bindings.patch  | 55 ++++++++++++++++++++++++++++++++++++++
 debian/patches/series              |  1 +
 debian/python-qgis-common.install  |  2 +-
 debian/python-qgis.install         |  2 +-
 debian/rules                       |  1 -
 8 files changed, 61 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 6f10e27..5b4afee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ qgis (2.14.0+dfsg0-4~exp1) UNRELEASED; urgency=medium
   * Add patch to fix globe plugin build failure with Qt5.
   * Add patch to fix QSpatiaLite provider build failure with Qt5.
   * Add upstream patch to make pyuic4-wrapper PyQt5 aware.
+  * Add patch to not require Python 3 for Qt5.
 
  -- Bas Couwenberg <sebastic at debian.org>  Fri, 08 May 2015 23:40:06 +0200
 
diff --git a/debian/libqgis-dev.install b/debian/libqgis-dev.install
index 97388c3..eca003a 100644
--- a/debian/libqgis-dev.install
+++ b/debian/libqgis-dev.install
@@ -6,5 +6,5 @@ usr/lib/libqgis_analysis.so
 usr/lib/libqgis_networkanalysis.so
 #usr/lib/libqgis_server.so
 usr/lib/libqgisgrass7.so
-#usr/lib/libqgispython.so
+usr/lib/libqgispython.so
 usr/share/qgis/FindQGIS.cmake
diff --git a/debian/libqgispython2.14.0.install b/debian/libqgispython2.14.0.install
index e3f5cf2..7926376 100644
--- a/debian/libqgispython2.14.0.install
+++ b/debian/libqgispython2.14.0.install
@@ -1 +1 @@
-#usr/lib/libqgispython.so.*
+usr/lib/libqgispython.so.*
diff --git a/debian/patches/qt5-bindings.patch b/debian/patches/qt5-bindings.patch
new file mode 100644
index 0000000..a58234e
--- /dev/null
+++ b/debian/patches/qt5-bindings.patch
@@ -0,0 +1,55 @@
+Description: Don't require Python 3 for Qt5.
+ Also support PyQt5 path for uic widget plugin.
+Author: Bas Couwenberg <sebastic at debian.org>
+Forwarded: https://github.com/qgis/QGIS/pull/2906
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -676,11 +676,12 @@ ENDIF (UNIX AND NOT APPLE)
+ #############################################################
+ # Python build dependency
+ 
+-IF(ENABLE_QT5)
++SET (ENABLE_PYTHON3 FALSE CACHE BOOL "If enabled will try to find Python 3 before looking for Python 2")
++IF(ENABLE_PYTHON3)
+   SET(PYTHON_VER 3 CACHE STRING "Python version")
+-ELSE(ENABLE_QT5)
++ELSE(ENABLE_PYTHON3)
+   SET(PYTHON_VER 2.7 CACHE STRING "Python version")
+-ENDIF(ENABLE_QT5)
++ENDIF(ENABLE_PYTHON3)
+ 
+ FIND_PACKAGE(PythonInterp ${PYTHON_VER} REQUIRED)
+ 
+@@ -718,7 +719,11 @@ IF (WITH_BINDINGS)
+   ENDIF (NOT BINDINGS_GLOBAL_INSTALL)
+ 
+   IF (WITH_CUSTOM_WIDGETS)
+-    SET(PYUIC_WIDGET_PLUGIN_DIRECTORY ${PYQT4_MOD_DIR}/uic/widget-plugins/)
++    IF(ENABLE_QT5)
++      SET(PYUIC_WIDGET_PLUGIN_DIRECTORY ${PYQT5_MOD_DIR}/uic/widget-plugins/)
++    ELSE(ENABLE_QT5)
++      SET(PYUIC_WIDGET_PLUGIN_DIRECTORY ${PYQT4_MOD_DIR}/uic/widget-plugins/)
++    ENDIF(ENABLE_QT5)
+   ENDIF (WITH_CUSTOM_WIDGETS)
+ 
+ ENDIF (WITH_BINDINGS)
+--- a/cmake/FindPythonLibrary.cmake
++++ b/cmake/FindPythonLibrary.cmake
+@@ -44,13 +44,13 @@ else(EXISTS "${PYTHON_INCLUDE_PATH}" AND
+     endif("${PYTHON_CUSTOM_FRAMEWORK}" MATCHES "Python\\.framework")
+   endif(APPLE AND PYTHON_CUSTOM_FRAMEWORK)
+ 
+-  IF (ENABLE_QT5)
++  IF (ENABLE_PYTHON3)
+     FIND_PACKAGE(PythonInterp 3)
+     ADD_DEFINITIONS(-DPYTHON3)
+-  ELSE (ENABLE_QT5)
++  ELSE (ENABLE_PYTHON3)
+     FIND_PACKAGE(PythonInterp 2)
+     ADD_DEFINITIONS(-DPYTHON2)
+-  ENDIF (ENABLE_QT5)
++  ENDIF (ENABLE_PYTHON3)
+ 
+   if(PYTHONINTERP_FOUND)
+     FIND_FILE(_find_lib_python_py FindLibPython.py PATHS ${CMAKE_MODULE_PATH})
diff --git a/debian/patches/series b/debian/patches/series
index 9afd04c..25b1e92 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ globe-adapt-to-osgearth-2.7.patch
 qt5-globe-plugin.patch
 qt5-qspatialite.patch
 make-pyuic4-wrapper-PyQt5-aware.patch
+qt5-bindings.patch
diff --git a/debian/python-qgis-common.install b/debian/python-qgis-common.install
index dec32f7..0cf9348 100644
--- a/debian/python-qgis-common.install
+++ b/debian/python-qgis-common.install
@@ -1,2 +1,2 @@
-#usr/share/qgis/python/*
+usr/share/qgis/python/*
 #usr/lib/python*/*-packages/PyQt4/uic/widget-plugins/qgis_customwidgets.py
diff --git a/debian/python-qgis.install b/debian/python-qgis.install
index e42dd12..327df22 100644
--- a/debian/python-qgis.install
+++ b/debian/python-qgis.install
@@ -1 +1 @@
-#usr/lib/python*/*-packages/qgis/
+usr/lib/python*/*-packages/qgis/
diff --git a/debian/rules b/debian/rules
index e3dc3ba..68b9ccf 100755
--- a/debian/rules
+++ b/debian/rules
@@ -59,7 +59,6 @@ CMAKE_OPTS := \
 	-DBINDINGS_GLOBAL_INSTALL=TRUE \
 	-DPEDANTIC=TRUE \
 	-DENABLE_QT5=TRUE \
-	-DWITH_BINDINGS=FALSE \
 	-DWITH_QSPATIALITE=TRUE \
 	-DWITH_SERVER=FALSE \
 	-DWITH_SERVER_PLUGINS=TRUE \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/qgis.git



More information about the Pkg-grass-devel mailing list