diff -pruN 4:4.14.0-1/cmake/modules/PythonMacros.cmake 4:4.14.2-0ubuntu9/cmake/modules/PythonMacros.cmake
--- 4:4.14.0-1/cmake/modules/PythonMacros.cmake	2017-11-22 07:27:36.000000000 +0000
+++ 4:4.14.2-0ubuntu9/cmake/modules/PythonMacros.cmake	1970-01-01 00:00:00.000000000 +0000
@@ -1,27 +0,0 @@
-# Python macros
-# ~~~~~~~~~~~~~
-# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
-# Cloned-and-hacked by Colin Watson <cjwatson@ubuntu.com>, removing bytecode
-# support.
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-#
-# This file defines the following macros:
-#
-# PYTHON_INSTALL (SOURCE_FILE DESINATION_DIR)
-#     Install the SOURCE_FILE, which is a Python .py file, into the
-#     destination directory during install.
-
-GET_FILENAME_COMPONENT(PYTHON_MACROS_MODULE_PATH ${CMAKE_CURRENT_LIST_FILE}  PATH)
-
-MACRO(PYTHON_INSTALL SOURCE_FILE DESINATION_DIR)
-
-  FIND_FILE(_python_compile_py PythonCompile.py PATHS ${CMAKE_MODULE_PATH})
-
-  ADD_CUSTOM_TARGET(compile_python_files ALL)
-
-  # Install the source file.
-  INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR})
-ENDMACRO(PYTHON_INSTALL)
-
diff -pruN 4:4.14.0-1/CMakeLists.txt 4:4.14.2-0ubuntu9/CMakeLists.txt
--- 4:4.14.0-1/CMakeLists.txt	2017-11-22 07:27:36.000000000 +0000
+++ 4:4.14.2-0ubuntu9/CMakeLists.txt	2017-11-22 07:27:37.000000000 +0000
@@ -8,18 +8,21 @@ find_package(KDE4 4.9.4 REQUIRED)
 # Match what's used in the main macros
 cmake_policy(SET CMP0002 OLD)
 find_package(PythonLibrary)
+find_package(PythonLibs)
 
 include(KDE4Defaults)
 include(MacroLibrary)
 include(PythonMacros)
 include(FeatureSummary)
+find_package(PkgConfig REQUIRED)
+# this doesn't work ...
+pkg_check_modules(PYTHON xpython${_CURRENT_VERSION})
 
 option(PYKDEUIC4_ALTINSTALL "Enable parallel-installation of the PyKDE4 tools" FALSE)
 
 set(CMAKE_MODULE_PATH ${pykde4_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
 
 find_package(PythonLibrary)
-find_package(PythonLibs)
 
 set_package_properties(KDE4 PROPERTIES DESCRIPTION "The KDE libraries"
                        URL "http://www.kde.org" TYPE REQUIRED
@@ -78,8 +81,8 @@ set_package_properties(PolkitQt PROPERTI
                        "Required to build Python Polkit bindings")
 
 include_directories(
-    ${PYTHON_INCLUDE_DIR}
-    ${PYTHON_INCLUDE_DIR2}
+    ${PYTHON_INCLUDE_DIRS}
+    ${PYTHON_INCLUDE_PATH}
     ${SIP_INCLUDE_DIR}
     ${QT_INCLUDE_DIR}
     ${QT_QT_INCLUDE_DIR}
@@ -263,23 +266,22 @@ python_install(__init__.py ${PYTHON_SITE
 # (Don't forget the / at the end of sip/.)
 install(FILES ${CMAKE_BINARY_DIR}/pykde_config.sip DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4/)
 if(DEFAULT_PYTHON_VERSION)
-    install(DIRECTORY sip/ DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4
+  install(DIRECTORY sip/ DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4
         PATTERN "*~" EXCLUDE    # This sucks, why can't I just whitelist what I _do_ want?
         PATTERN ".svn" EXCLUDE
         PATTERN "*.in" EXCLUDE)
-    message("Installing sip files in this build pass")
+   message("Installing sip files in this build pass")
 else(DEFAULT_PYTHON_VERSION)
-    message("Not installing sip files in this build pass")
+   message("Not installing sip files in this build pass")
 endif(DEFAULT_PYTHON_VERSION)
 
 add_subdirectory(tools)
 #add_subdirectory(docs)
 add_subdirectory(examples)
-if ((PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION) OR
-    PYTHON_VERSION_MAJOR GREATER 2)
 # Due to version specific ABI tagging in Python 3 so files, we can build for
 # all Python 3 versions without a problem.
+if ((PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION) OR PYTHON_VERSION_MAJOR GREATER 2)
     add_subdirectory(kpythonpluginfactory)
-endif ()
+endif ((PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION) OR PYTHON_VERSION_MAJOR GREATER 2)
 
 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff -pruN 4:4.14.0-1/debian/changelog 4:4.14.2-0ubuntu9/debian/changelog
--- 4:4.14.0-1/debian/changelog	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/changelog	2017-11-03 16:21:53.000000000 +0000
@@ -1,180 +1,560 @@
-pykde4 (4:4.14.0-1) unstable; urgency=medium
+pykde4 (4:4.14.2-0ubuntu9) bionic; urgency=medium
 
-  * New upstream release.
-  * Refresh patches.
+  * Rebuild against new sip-api-12.2.
 
- -- Maximiliano Curia <maxy@debian.org>  Sun, 24 Aug 2014 04:54:50 +0200
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Fri, 03 Nov 2017 17:21:53 +0100
 
-pykde4 (4:4.13.3-1) unstable; urgency=medium
+pykde4 (4:4.14.2-0ubuntu8) artful; urgency=medium
+
+  * No-change rebuild against python3.6
+
+ -- Jeremy Bicha <jbicha@ubuntu.com>  Wed, 02 Aug 2017 16:18:28 -0400
+
+pykde4 (4:4.14.2-0ubuntu7) artful; urgency=medium
+
+  * No change rebuild to add Python 3.6 support.
+
+ -- Michael Hudson-Doyle <michael.hudson@ubuntu.com>  Wed, 07 Jun 2017 16:21:56 -0700
+
+pykde4 (4:4.14.2-0ubuntu6) xenial; urgency=medium
+
+  * No-change rebuild to drop python3.4 support.
+
+ -- Matthias Klose <doko@ubuntu.com>  Tue, 19 Jan 2016 13:33:06 +0000
+
+pykde4 (4:4.14.2-0ubuntu5) xenial; urgency=medium
+
+  * No-change rebuild for python3 defaults change.
+
+ -- Matthias Klose <doko@ubuntu.com>  Fri, 23 Oct 2015 19:38:07 +0000
+
+pykde4 (4:4.14.2-0ubuntu4) wily; urgency=medium
+
+  [ Harald Sitter ]
+  * Build without kdepimlibs5-dev present to facilitate the kdepim frameworks
+    5 transition. kdepimlibs as of KDE Applications 15.08 will be frameworks
+    based and not co-installable with the old libs (due to data files).
+    Disable the pimlibs in pykde4.
+
+  [ Jonathan Riddell ]
+  * Remove build-dep on libsoprano-dev
+
+ -- Harald Sitter <sitter@kde.org>  Mon, 17 Aug 2015 10:21:55 +0200
+
+pykde4 (4:4.14.2-0ubuntu3) wily; urgency=medium
+
+  * Unversioned boost build dependency
+
+ -- Matthias Klose <doko@ubuntu.com>  Sat, 08 Aug 2015 15:12:14 +0000
+
+pykde4 (4:4.14.2-0ubuntu2) wily; urgency=medium
+
+  * No-change rebuild for python3.5 transition
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Sat, 25 Jul 2015 20:20:35 +0000
+
+pykde4 (4:4.14.2-0ubuntu1) vivid; urgency=medium
+
+  * New upstream release
+
+ -- Scarlett Clark <sgclark@kubuntu.org>  Fri, 10 Oct 2014 06:50:20 -0700
+
+pykde4 (4:4.14.1-0ubuntu1) utopic; urgency=medium
+
+  * New upstream release
+  * Repair optional_install_sip_files.diff so it applies. 
+
+ -- Scarlett Clark <scarlett@scarlettgatelyclark.com>  Mon, 22 Sep 2014 18:02:03 +0200
+
+pykde4 (4:4.14.0-0ubuntu1) utopic; urgency=medium
+
+  * New upstream release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 20 Aug 2014 13:45:21 +0200
+
+pykde4 (4:4.13.97-0ubuntu2) utopic; urgency=medium
+
+  * Rebuild without nepomuk support
+  * Drop references to nepomuk from package descriptions
+
+ -- Scott Kitterman <scott@kitterman.com>  Fri, 08 Aug 2014 00:35:43 -0400
+
+pykde4 (4:4.13.97-0ubuntu1) utopic; urgency=medium
+
+  [ Scarlett Clark ]
+  * New upstream beta release RC
+
+  [ Jonathan Riddell ]
+  * Refresh patches
+  * Call dh_python2 with --no-shebang-rewrite as this fails on pyuickde4
+    symlink
+
+ -- Scarlett Clark <scarlett@scarlettgatelyclark.com>  Thu, 31 Jul 2014 13:23:00 -0700
+
+pykde4 (4:4.13.95-0ubuntu1) utopic; urgency=medium
+
+  [ Scarlett Clark ]
+  * New upstream beta release
+
+  [ Jonathan Riddell ]
+  * Build without nepomuk
+
+ -- Scarlett Clark <scarlett@scarlettgatelyclark.com>  Wed, 30 Jul 2014 20:57:28 +0200
+
+pykde4 (4:4.13.90-0ubuntu1) utopic; urgency=medium
+
+  * New upstream beta release
+  * Removed debian_patches_no_gl_defines.diff, does not apply, a condition was put in its place. 
+
+ -- Scarlett Clark <scarlett@scarlettgatelyclark.com>  Thu, 17 Jul 2014 16:45:33 -0700
+
+pykde4 (4:4.13.2-0ubuntu2) utopic; urgency=medium
+
+  * Add debian/patches/debian_patches_no_gl_defines.diff to fix build with
+    python-qt4 4.11 (and adjust minimum build-dep)
+      - Patch from Fedora via Debian
+
+ -- Scott Kitterman <scott@kitterman.com>  Mon, 23 Jun 2014 21:00:25 -0400
+
+pykde4 (4:4.13.2-0ubuntu1) utopic; urgency=medium
+
+  [ Dimitri John Ledkov ]
+  * Build against boost1.55.
+
+  [ Jonathan Riddell ]
+  * new upstream release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 18 Jun 2014 12:10:17 +0100
+
+pykde4 (4:4.13.0-0ubuntu1) trusty; urgency=medium
+
+  * New upstream KDE Software Compilation release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Thu, 10 Apr 2014 22:33:07 +0100
+
+pykde4 (4:4.12.97-0ubuntu1) trusty; urgency=medium
+
+  * New upstream release candidate 
+
+ -- Philip Muškovac <yofel@kubuntu.org>  Wed, 02 Apr 2014 11:59:56 +0200
+
+pykde4 (4:4.12.95-0ubuntu2) trusty; urgency=medium
+
+  * Don't hard-code python versions in .install files.
+
+ -- Matthias Klose <doko@ubuntu.com>  Sun, 23 Mar 2014 19:59:48 +0100
+
+pykde4 (4:4.12.95-0ubuntu1) trusty; urgency=medium
+
+  [ Rohan Garg ]
+  * New upstream beta release
 
   [ Dmitry Shachnev ]
-  * Add a patch from Fedora (no_gl_defines.diff) to fix building against
-    python-qt4 4.11.
+  * Add watch file (set up to track unstable releases).
 
-  [ Maximiliano Curia ]
-  * New upstream release.
-  * Remove upstream applied patch: no_gl_defines.diff
+ -- Rohan Garg <rohangarg@kubuntu.org>  Thu, 20 Mar 2014 20:47:35 +0100
 
- -- Maximiliano Curia <maxy@debian.org>  Thu, 31 Jul 2014 16:30:28 +0200
+pykde4 (4:4.12.90-0ubuntu1) trusty; urgency=medium
 
-pykde4 (4:4.13.1-1) experimental; urgency=medium
+  * Install /usr/bin/pykdeuic4-3.4
+  * New upstream beta release
 
-  * New upstream release.
-  * Update build-dependencies.
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 19 Mar 2014 12:09:24 +0000
 
- -- Maximiliano Curia <maxy@debian.org>  Mon, 26 May 2014 13:22:34 +0200
+pykde4 (4:4.12.3-0ubuntu1) trusty; urgency=medium
 
-pykde4 (4:4.12.2-2) unstable; urgency=medium
+  * New upstream bugfix release
 
-  * Release to unstable
+ -- Rohan Garg <rohangarg@kubuntu.org>  Tue, 04 Mar 2014 21:20:52 +0100
 
- -- Maximiliano Curia <maxy@debian.org>  Mon, 28 Apr 2014 12:25:11 +0200
+pykde4 (4:4.12.2-0ubuntu1) trusty; urgency=medium
 
-pykde4 (4:4.12.2-1) experimental; urgency=medium
+  * New upstream bugfix release
 
-  * New upstream release.
-  * Bump kde-sc-dev-latest build dependency.
+ -- Rohan Garg <rohangarg@kubuntu.org>  Wed, 05 Feb 2014 00:35:25 +0000
 
- -- Maximiliano Curia <maxy@debian.org>  Mon, 10 Feb 2014 11:32:20 +0100
+pykde4 (4:4.12.1-0ubuntu1) trusty; urgency=low
 
-pykde4 (4:4.11.5-1) unstable; urgency=low
+  * New upstream bugfix release
 
-  * New upstream release.
-  * Bump Standards-Version to 3.9.5, no changes needed.
+ -- Rohan Garg <rohangarg@kubuntu.org>  Thu, 16 Jan 2014 08:50:11 +0000
 
- -- Maximiliano Curia <maxy@debian.org>  Tue, 28 Jan 2014 11:59:32 +0100
+pykde4 (4:4.12.0-0ubuntu2) trusty; urgency=medium
 
-pykde4 (4:4.11.3-1) unstable; urgency=low
+  * debian/rules: Fix support for multiple Python 3 versions.
 
-  * New upstream release.
-  * Update build dependencies.
+ -- William Grant <wgrant@ubuntu.com>  Mon, 30 Dec 2013 13:38:41 +1100
 
- -- Maximiliano Curia <maxy@debian.org>  Sat, 09 Nov 2013 19:28:36 +0100
+pykde4 (4:4.12.0-0ubuntu1) trusty; urgency=low
 
-pykde4 (4:4.11.2-1) experimental; urgency=low
+  * New upstream release
 
-  * New upstream release.
-  * Refresh patches.
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 18 Dec 2013 17:52:06 +0000
 
- -- Maximiliano Curia <maxy@debian.org>  Wed, 09 Oct 2013 16:25:06 +0200
+pykde4 (4:4.11.97-0ubuntu1) trusty; urgency=low
 
-pykde4 (4:4.10.5-1) unstable; urgency=low
+  * New upstream RC release
 
-  * New upstream release.
-  * Add lintian override for python3-pykde4.
-  * Add unused subst variables.
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Fri, 29 Nov 2013 13:50:30 +0000
 
- -- Maximiliano Curia <maxy@debian.org>  Fri, 12 Jul 2013 23:23:53 +0200
+pykde4 (4:4.11.95-0ubuntu1) trusty; urgency=low
 
-pykde4 (4:4.10.4-1) experimental; urgency=low
+  * New upstream beta release
 
-  * New upstream release.
+ -- Rohan Garg <rohangarg@kubuntu.org>  Mon, 25 Nov 2013 18:44:35 +0100
 
-  [ José Manuel Santamaría Lema ]
-  * Bump kde-sc-dev-latest build dependency to 4:4.10.1.
-  * Bump build dependencies on other KDE SC components to 4:4.10.
-  * Add build depends on:
-    - nepomuk-core-dev
-    - pkg-config
-  * Update patches:
-    - update python_modules_dont_link_against_libpython.diff.
-    - update add_qt_kde_definitions.diff.
-    - update make_pykde4_respect_sip_flags.diff.
-    - update optional_install_sip_files.diff.
-    - refresh other patches to make them apply without any offset.
-  * Update installed files and debian/not-installed.
-  * Add watch file.
-  * Add lintian overrides for hardening-no-fortify-functions.
-
-  [ Maximiliano Curia ]
-  * Add myself to uploaders.
-  * Revert most version dependencies changes reshuffling build-deps.
-  * Bump kdepimlibs-dev build-dep to 4:4.10.4.
-  * Refresh patches.
-  * Update python-kde4-dev install file.
-  * Reverting build-dep versions changes made for reshuffle.
-
- -- Maximiliano Curia <maxy@debian.org>  Fri, 14 Jun 2013 22:54:19 +0200
-
-pykde4 (4:4.8.4-2) unstable; urgency=low
-
-  * Team upload
-  * Updates for sip4 transition and python multiarch (Closes: #708857)
-    - Bump minimum python-sip version to 4.14
-    - Add debian/patches/new_pyincludes.diff (based on Kubuntu patch) to
-      support multiple include directories for python3.3
-    - Add debian/patches/cmake_no_bytecode.diff to temporarily disable
-      byte compilation (which breaks python3 part of the build and is
-      not needed - upstream has a better solution for 4.9+)
-    - Add debian/patches/python3_sip_options.diff (from Kubuntu) to fix
-      duplicate typedef with current python-qt4
-      - Bump minimum python-qt4 and python-qt4-dev version to 4.9.4
-    - Add debian/patches/pythonpluginfactory_python3.diff and
-      kpythonpluginfactory_3.2support.diff, both from Kubuntu, to support
-      building kpythonpluginfactory for python3 too
-    - Adjust debian/rules to use the new include directories and to use
-      appropriate ABI tags for python3 (Closes: #707148)
+pykde4 (4:4.11.80-0ubuntu1) trusty; urgency=low
+
+  * New upstream beta release
+  * Update boost to 1.54 
+
+ -- Rohan Garg <rohangarg@kubuntu.org>  Sat, 23 Nov 2013 18:06:47 +0100
+
+pykde4 (4:4.11.2-0ubuntu2) saucy; urgency=low
+
+  * Switch to unversioned libboost-dev depends to match other Kubuntu packages
+    - Mixing boost versions in the KDEs stack is like crossing the streams
+
+ -- Scott Kitterman <scott@kitterman.com>  Mon, 14 Oct 2013 15:49:13 -0400
+
+pykde4 (4:4.11.2-0ubuntu1) saucy; urgency=low
+
+  * New upstream release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Mon, 30 Sep 2013 15:01:05 +0100
+
+pykde4 (4:4.11.1+git20130916-0ubuntu3) saucy; urgency=low
+
+  * Build-depend on Pyqt 4.10.3-1ubuntu1
+  * Remove kplotaxis_qreal_fix.patch, now works with PyQt changes
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Fri, 20 Sep 2013 07:59:03 +0100
+
+pykde4 (4:4.11.1+git20130916-0ubuntu2) saucy; urgency=low
+
+  * Switch QList<double> to <qreal> in sip/kdeui/kplotaxis.sip to fix FTBFS on
+    armhf
+
+ -- Scott Kitterman <scott@kitterman.com>  Thu, 19 Sep 2013 23:46:15 -0400
+
+pykde4 (4:4.11.1+git20130916-0ubuntu1) saucy; urgency=low
+
+  * Upstream snapshot to complete fix for sip4 4.15 breakage fixes
+    - Drop debian/patches/pykde4.11_protected_public.patch, was backported
+      from upstream, no longer required
+    - Refreshed patches
+
+ -- Scott Kitterman <scott@kitterman.com>  Mon, 16 Sep 2013 23:57:35 -0400
+
+pykde4 (4:4.11.1-0ubuntu2) saucy; urgency=low
+
+  * Add debian/patches/pykde4.11_protected_public.patch to fix breakage with
+    sip4 4.15/4.15.1 (LP: #1220675)
+  * Bump minimum sip4 version requirement
+
+ -- Scott Kitterman <scott@kitterman.com>  Sat, 07 Sep 2013 13:23:04 -0400
+
+pykde4 (4:4.11.1-0ubuntu1) saucy; urgency=low
+
+  * New upstream bugfix release.
+
+ -- Philip Muškovac <yofel@kubuntu.org>  Fri, 06 Sep 2013 22:45:13 +0100
+
+pykde4 (4:4.11.0-0ubuntu1) saucy; urgency=low
+
+  [ Howard Chan ]
+  * New upstream release
+
+  [ Jonathan Riddell ]
+  * New upstream release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 14 Aug 2013 00:45:15 +0100
+
+pykde4 (4:4.10.97-0ubuntu1) saucy; urgency=low
+
+  * New upstream RC 2 release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Fri, 26 Jul 2013 20:13:49 +0100
+
+pykde4 (4:4.10.95-0ubuntu1) saucy; urgency=low
+
+  * New upstream RC release
+
+ -- Rohan Garg <rohangarg@kubuntu.org>  Fri, 19 Jul 2013 12:33:38 +0000
+
+pykde4 (4:4.10.90-0ubuntu1) saucy; urgency=low
+
+  * New upstream bet release
+
+ -- Michał Zając <quintasan@kubuntu.org>  Fri, 28 Jun 2013 18:35:59 +0100
+
+pykde4 (4:4.10.80-0ubuntu1) saucy; urgency=low
+
+  * New upstream release
+
+ -- Rohan Garg <rohangarg@kubuntu.org>  Fri, 21 Jun 2013 02:03:19 +0100
+
+pykde4 (4:4.10.4-0ubuntu2) saucy; urgency=low
+
+  * Rebuild against sip-api-10
+
+ -- Scott Kitterman <scott@kitterman.com>  Thu, 20 Jun 2013 11:54:09 -0400
+
+pykde4 (4:4.10.4-0ubuntu1) saucy-proposed; urgency=low
+
+  * New upstream bugfix release
+
+ -- Rohan Garg <rohangarg@kubuntu.org>  Fri, 07 Jun 2013 00:56:52 +0100
+
+pykde4 (4:4.10.2-0ubuntu1) raring; urgency=low
+
+  * New upstream bugfix release
+    - refresh optional_install_sip_files.diff
+
+ -- Philip Muškovac <yofel@kubuntu.org>  Sun, 31 Mar 2013 15:06:05 +0200
+
+pykde4 (4:4.10.1-0ubuntu1) raring-proposed; urgency=low
+
+  * New upstream bugfix release
+  * debian/rules: Instead of fixing the abi-tags after build which fails as
+    cmake just re-creates the original libs, install 3.* builds into a 
+    folder, fix the tags and then move everything into the same place again
+    (LP: #1124479)
+
+ -- Philip Muškovac <yofel@kubuntu.org>  Tue, 05 Mar 2013 16:59:58 +0000
+
+pykde4 (4:4.10.0-0ubuntu1) raring-proposed; urgency=low
+
+  [ Rohan Garg ]
+  * New upstream release
+
+  [ Philip Muškovac ]
   * Add python-version-specific pykdeuic4 links to python-kde4-dev.install
 
- -- Scott Kitterman <scott@kitterman.com>  Fri, 17 May 2013 18:38:28 -0400
+ -- Philip Muškovac <yofel@kubuntu.org>  Wed, 06 Feb 2013 12:24:34 +0000
+
+pykde4 (4:4.9.98-0ubuntu2) raring; urgency=low
+
+  * Add kubuntu_kpythonpluginfactory_3.2support.diff so KPythonPluginFactory
+    can load KCM's with python >= 3.2
+
+ -- Philip Muškovac <yofel@kubuntu.org>  Wed, 30 Jan 2013 21:50:11 +0100
+
+pykde4 (4:4.9.98-0ubuntu1) raring-proposed; urgency=low
+
+  [ Philip Muškovac ]
+  * New upstream release candidate
+    - refresh add_qt_kde_definitions.diff, optional_install_sip_files.diff,
+      python3.3.diff, pythonpluginfactory_python3.diff
+
+  [ Jonathan Riddell ]
+  * New upstream release candidate
+  * Add kubuntu_include_dirs.diff to use multiarch include dirs
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Fri, 18 Jan 2013 16:34:47 +0000
+
+pykde4 (4:4.9.95-0ubuntu1) raring; urgency=low
+
+  [ Scott Kitterman ]
+  * Add missing attribution/copyright information to
+    debian/patches/pythonpluginfactory_python3.diff
+  * Update debian/copyright
+
+  [ Jonathan Riddell ]
+  * New upstream RC release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Tue, 18 Dec 2012 23:50:52 +0000
+
+pykde4 (4:4.9.90-0ubuntu2) raring; urgency=low
+
+  [ Philip Muškovac ]
+  * Bump build-dep on python-sip-dev to >= 4.14 
+  * Bump build-dep on python-qt4 and python-qt4-dev to >= 4.9
+
+  [ Scott Kitterman ]
+  * Add debian/patches/pythonpluginfactory_python3.diff to support KCMs
+    written in Python 3
+  * Update debian/python3-pykde4.install
+  * Update debian/rules to proved version specific ABI tags for Python 3
+    variants of kpythonplugingactory
+  * Update debian/not-installed
 
-pykde4 (4:4.8.4-1) unstable; urgency=low
+ -- Scott Kitterman <scott@kitterman.com>  Sat, 08 Dec 2012 14:17:32 -0500
+
+pykde4 (4:4.9.90-0ubuntu1) raring-proposed; urgency=low
+
+  * New upstream beta release
+  * Add pkg-config build-dep
+  * Refresh patches
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Fri, 07 Dec 2012 18:20:46 +0000
+
+pykde4 (4:4.9.80-0ubuntu2) raring; urgency=low
+
+  * Re-upload to deal with failure to upload on armhf
+
+ -- Scott Kitterman <scott@kitterman.com>  Thu, 22 Nov 2012 11:30:16 -0500
+
+pykde4 (4:4.9.80-0ubuntu1) raring; urgency=low
+
+  [ Jonathan Riddell ]
+  * New upstream beta release
+
+  [ Scott Kitterman ]
+  * Add build-dep on pkg-config
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Mon, 19 Nov 2012 16:27:55 +0000
+
+pykde4 (4:4.9.3-0ubuntu1) raring; urgency=low
+
+  * New upstream release (LP: #1074747)
+    - drop xxx.diff, applied upstream
+
+ -- Philip Muškovac <yofel@kubuntu.org>  Tue, 06 Nov 2012 22:51:57 +0100
+
+pykde4 (4:4.9.2-0ubuntu3) raring; urgency=low
+
+  * Fix building for python3.3.
+  * Fix installation of multiple python3 extensions.
+
+ -- Matthias Klose <doko@ubuntu.com>  Fri, 26 Oct 2012 18:11:10 +0200
+
+pykde4 (4:4.9.2-0ubuntu2) quantal; urgency=low
+
+  * Rebuild to get missing binaries that were lost due to being copied from
+    proposed to release before they were built
+
+ -- Scott Kitterman <scott@kitterman.com>  Fri, 05 Oct 2012 01:18:48 -0400
+
+pykde4 (4:4.9.2-0ubuntu1) quantal-proposed; urgency=low
+
+  * New upstream bugfix release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Tue, 02 Oct 2012 15:47:12 +0100
+
+pykde4 (4:4.9.1-0ubuntu1) quantal; urgency=low
 
-  * Team upload
   * New upstream release
-    - Drop debian/patches/python32_compile_fix.diff, incorporated upstream
-    - Bump build-depends version for kde-sc-dev-latest to 4:4.8.3
-  * Add python-dbg and python3-dbg to python-kde4-dbg and python3-kde4-dbg
-    depends
-  * Update debian/not-installed for python3 (change from Kubuntu)
 
- -- Scott Kitterman <scott@kitterman.com>  Sat, 16 Jun 2012 20:28:58 -0400
+ -- Harald Sitter <apachelogger@ubuntu.com>  Tue, 04 Sep 2012 15:33:15 +0530
 
-pykde4 (4:4.7.4-4) unstable; urgency=low
+pykde4 (4:4.9.0-0ubuntu2) quantal; urgency=low
 
-  * Team upload
-  * Use dh_sip3 for Python 3 instead of dh_sip
-    - Update debian/control (sip3:Depends for python3-pykde4)
-    - Add override for dh_python3 to also run dh_sip3
-  * Drop unneeded Breaks/Replaces on kdebindings-dbg for python3-pykde4-dbg
-  * Drop redundant build-depends on python
-  * Version python-all-dev build-depends to minimum version for dh_python2
-  * Drop unneeded Provides
+  * Revert incorrect build-dep version bump for libqt4-dev in last upload
 
- -- Scott Kitterman <scott@kitterman.com>  Tue, 22 May 2012 09:43:25 -0400
+ -- Scott Kitterman <scott@kitterman.com>  Fri, 03 Aug 2012 03:18:21 -0400
 
-pykde4 (4:4.7.4-3) unstable; urgency=low
+pykde4 (4:4.9.0-0ubuntu1) quantal; urgency=low
 
-  * Team upload.
-  * Add new binary python3-pykde for Python 3 support (Closes: #672553)
-    - Adjust debian/rules
-    - Add debian/patches/python32_compile_fix.diff to support building with
-      python3.2
-    - Bump build-dep version for kde4libs to 4:4.7.4-6 due to patch added in
-      that revision to support building with Python 3
-    - Add Python 3 equivalent packages to build-depends
-    - Thanks to Colin Watson for the patch
-  * Bump standards version to 3.9.3 without further change
+  * Use direct build-depends versions rather than kde-sc-dev-latest
+  * New upstream release
 
- -- Scott Kitterman <scott@kitterman.com>  Sun, 20 May 2012 16:06:19 -0400
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Thu, 26 Jul 2012 22:49:48 +0100
 
-pykde4 (4:4.7.4-2) unstable; urgency=low
+pykde4 (4:4.8.90-0ubuntu2) quantal; urgency=low
 
-  * Team upload. Upload to unstable.
+  * Additional changes from Debian:
+    - Set minimum shared-desktop-ontologies build-depend version to (>= 0.8)
+    - Drop redundant build-depend on python
+    - Set miniumum python-all-dev build-depend version to (>= 2.6.6-3~)
+    - Add python-dbg and python3-dbg to python-kde4-dbg and python3-kde4-dbg
+      depends
+    - Use sip3:Depends instead of sip:Depends for python3-pykde4
+    - Remove unneeeded python:Provides and python3:Provides
+    - Move dh_python3 override before dh_pyhon2
 
- -- Ana Beatriz Guerrero Lopez <ana@debian.org>  Wed, 07 Mar 2012 14:06:55 +0100
+ -- Scott Kitterman <scott@kitterman.com>  Sat, 16 Jun 2012 22:33:46 -0400
 
-pykde4 (4:4.7.4-1) experimental; urgency=low
+pykde4 (4:4.8.90-0ubuntu1) quantal; urgency=low
 
-  * New upstream release.
+  [ Philip Muškovac ]
+  * Merge python3 changes with debian 
+    - drop cmake_no_bytecode.diff and instead build-depend on
+      kdelibs5-dev >= 4:4.8.80 which now provides PYTHONDONTWRITEBYTECODE
+      to disable bytecode generation
+    - use PYTHONDONTWRITEBYTECODE in debian/rules
+    - set X-Python3-Version: >= 3.2
+  * Bump standards version to 3.9.3, no changes required
 
-  [ José Manuel Santamaría Lema ]
-  * Bump kde-sc-dev-latest build dependency to 4:4.7.4.
-  * Bump shared-desktop-ontologies build dependency to 0.8.
+  [ Felix Geyer ]
+  * New upstream beta release.
+  * Add files to not-installed that are renamed by dh_python3.
+
+ -- Felix Geyer <debfx@ubuntu.com>  Wed, 13 Jun 2012 08:25:54 +0200
+
+pykde4 (4:4.8.3-0ubuntu2) quantal; urgency=low
+
+  * Switch boost build-dep to 1.49 
 
- -- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>  Sun, 18 Dec 2011 01:38:40 +0100
+ -- Philip Muškovac <yofel@kubuntu.org>  Tue, 15 May 2012 20:54:34 +0200
 
-pykde4 (4:4.7.2-1) experimental; urgency=low
+pykde4 (4:4.8.3-0ubuntu1) quantal; urgency=low
+
+  [ Jonathan Kolberg ]
+  * New upstream release
+
+  [ Philip Muškovac ]
+  * Add python3 support from Colin Watson
+    - add python3-all-dev, python3-sip-de and python3-pyqt4 to build-depends
+    - add new packages: python3-pykde4 python3-pykde4-dbg
+    - add python3 support in rules
+    - adjust python-kde4.install to only install python2 files
+    - add cmake_no_bytecode.diff with a custom PythonMacros.cmake to work
+      around PythonMacros.cmake from kde4libs breaking with python3
+
+ -- Philip Muškovac <yofel@kubuntu.org>  Tue, 15 May 2012 17:49:49 +0200
+
+pykde4 (4:4.8.2-0ubuntu1) precise; urgency=low
+
+  * New upstream release
+
+ -- Philip Muškovac <yofel@kubuntu.org>  Sat, 31 Mar 2012 21:20:19 +0200
+
+pykde4 (4:4.8.1-0ubuntu1) precise; urgency=low
+
+  * New upstream release 
+
+ -- Philip Muškovac <yofel@kubuntu.org>  Sat, 03 Mar 2012 19:20:33 +0100
+
+pykde4 (4:4.8.0-0ubuntu2) precise; urgency=low
+
+  * Rebuild against python-qt4 4.9-2ubuntu3. (LP: #922721)
+
+ -- Felix Geyer <debfx@ubuntu.com>  Sat, 28 Jan 2012 12:40:46 +0100
+
+pykde4 (4:4.8.0-0ubuntu1) precise; urgency=low
+
+  * New upstream release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Thu, 19 Jan 2012 12:01:24 +0000
+
+pykde4 (4:4.7.97-0ubuntu1) precise; urgency=low
+
+  * New upstream RC release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Wed, 04 Jan 2012 13:14:59 +0000
+
+pykde4 (4:4.7.95-0ubuntu1) precise; urgency=low
+
+  * New upstream release candidate
+
+ -- Philip Muškovac <yofel@kubuntu.org>  Sat, 24 Dec 2011 17:33:53 +0100
+
+pykde4 (4:4.7.90-0ubuntu1) precise; urgency=low
+
+  * New upstream beta release
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Sat, 17 Dec 2011 19:30:20 +0000
+
+pykde4 (4:4.7.3-0ubuntu1) precise; urgency=low
+
+  * New upstream release
+  * Merge with Debian, remaining changes:
+   - version number in boost build-dep
+
+ -- Jonathan Riddell <jriddell@ubuntu.com>  Fri, 25 Nov 2011 22:18:54 +0000
+
+pykde4 (4:4.7.2-0r1) raring; urgency=low
 
   [ Modestas Vainius ]
   * Bump python-qt4 dependencies to 4.8.3-3~ (dh_python2 based).
@@ -186,7 +566,7 @@ pykde4 (4:4.7.2-1) experimental; urgency
   * Bump soprano build depend to 2.7.0.
   * Update not-installed file.
 
- -- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>  Sat, 03 Dec 2011 10:45:37 -0300
+ -- Modestas Vainius <modax@debian.org>  Sat, 30 Jul 2011 01:05:50 +0300
 
 pykde4 (4:4.6.80-3) unstable; urgency=low
 
@@ -256,3 +636,57 @@ pykde4 (4:4.6.80-1) experimental; urgenc
     proper place remains.
 
  -- Modestas Vainius <modax@debian.org>  Thu, 30 Jun 2011 21:29:02 +0300
+
+pykde4 (4:4.7.2-0ubuntu1) oneiric-proposed; urgency=low
+
+  * New upstream release (LP: #872506)
+
+ -- Jonathan Kolberg <bulldog98@kubuntu-de.org>  Thu, 13 Oct 2011 12:29:27 +0200
+
+pykde4 (4:4.7.1-0ubuntu1) oneiric; urgency=low
+
+  * New upstream release
+
+ -- Jonathan Kolberg <bulldog98@kubuntu-de.org>  Sun, 04 Sep 2011 00:22:44 +0200
+
+pykde4 (4:4.7.0-0ubuntu3) oneiric; urgency=low
+
+  * No change rebuild against new PyQt (LP: #826321)
+
+ -- Philip Muškovac <yofel@kubuntu.org>  Sun, 14 Aug 2011 16:54:58 +0200
+
+pykde4 (4:4.7.0-0ubuntu2) oneiric; urgency=low
+
+  * Finish switch to dh_python2 (cherrypick from Debian qt-kde git)
+    - Bump python-qt/-dev depends/build-depends requirements to match
+      dh_python2 versions
+    - Drop build-dep on python-support
+  * Drop obsolete XB-Python-Version field from debian/control
+
+ -- Scott Kitterman <scott@kitterman.com>  Mon, 01 Aug 2011 12:45:23 -0400
+
+pykde4 (4:4.7.0-0ubuntu1) oneiric; urgency=low
+
+  * New upstream release
+
+ -- Romain Perier <romain.perier@gmail.com>  Sat, 23 Jul 2011 09:58:56 +0200
+
+pykde4 (4:4.6.90-0ubuntu2) oneiric; urgency=low
+
+  * Only suggest libpython2.6 (i.e. libpython for the non-default python) so
+    we don't pull python2.6 onto the CD
+  * Update location for Vcs-* branch
+
+ -- Scott Kitterman <scott@kitterman.com>  Thu, 21 Jul 2011 23:16:31 -0400
+
+pykde4 (4:4.6.90-0ubuntu1) oneiric; urgency=low
+
+  [ Romain Perier ]
+  * Initial release: split off from kdebindings.
+  * Packages rules synced with debian.
+
+  [ Felix Geyer ]
+  * Fix lintian warning not-binnmuable-all-depends-any python-kde4-dev ->
+    python-kde4.
+
+ -- Romain Perier <romain.perier@gmail.com>  Mon, 11 Jul 2011 12:42:17 +0200
diff -pruN 4:4.14.0-1/debian/compat 4:4.14.2-0ubuntu9/debian/compat
--- 4:4.14.0-1/debian/compat	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/compat	2015-08-24 16:03:16.000000000 +0000
@@ -1 +1 @@
-9
+7
diff -pruN 4:4.14.0-1/debian/control 4:4.14.2-0ubuntu9/debian/control
--- 4:4.14.0-1/debian/control	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/control	2015-08-24 16:03:16.000000000 +0000
@@ -1,49 +1,32 @@
 Source: pykde4
 Section: python
 Priority: optional
-Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
-Build-Depends: debhelper (>= 9),
-               kde-sc-dev-latest (>= 4:4.12),
-               kdelibs5-dev (>= 4:4.11),
-               kdepimlibs5-dev (>= 4:4.13),
-               libboost-dev (>= 1.34.0),
-               libphonon-dev (>= 4:4.6.0really4.4.4),
-               libqt4-dev (>= 4:4.7.1),
-               libqt4-opengl-dev (>= 4:4.7.1),
-               libqtwebkit-dev,
-               libsoprano-dev (>= 2.7.0),
-               nepomuk-core-dev (>= 4:4.11),
-               pkg-config,
-               pkg-kde-tools (>= 0.12),
-               python-all-dev (>= 2.6.6-3~),
-               python-qt4 (>= 4.9.5),
-               python-qt4-dev (>= 4.9.5),
-               python-sip-dev (>= 4.14),
-               python3-all-dev,
-               python3-pyqt4 (>= 4.9.5),
-               python3-sip-dev (>= 4.14),
-               shared-desktop-ontologies (>= 0.8)
-Uploaders: Sune Vuorela <sune@debian.org>,
-           Modestas Vainius <modax@debian.org>,
-           Michael Meskes <meskes@debian.org>,
-           Maximiliano Curia <maxy@debian.org>
-Standards-Version: 3.9.5
+Maintainer: Kubuntu Developers <kubuntu-devel@lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
+Build-Depends: 
+ debhelper (>= 7.3), cmake, pkg-kde-tools (>= 0.12),
+ kdelibs5-dev (>= 4:4.14.2),
+ libphonon-dev (>= 4:4.6.0really4.4.4),
+ libqt4-dev (>= 4:4.7.1), libqt4-opengl-dev (>= 4:4.7.1), libqtwebkit-dev,
+ libboost-dev,
+ python-all-dev (>= 2.6.6-3~), python3-all-dev,
+ python-sip-dev (>= 4.15.2~), python3-sip-dev, pkg-config,
+ python-qt4 (>= 4.11), python3-pyqt4, python-qt4-dev (>= 4.9)
+Uploaders: Sune Vuorela <sune@debian.org>, Modestas Vainius <modax@debian.org>, Michael Meskes <meskes@debian.org>
+Standards-Version: 3.9.3
 X-Python-Version: >= 2.5
 X-Python3-Version: >= 3.2
 Homepage: http://www.kde.org
-Vcs-Git: git://anonscm.debian.org/pkg-kde/kde-sc/pykde4.git
-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-kde/kde-sc/pykde4.git
+Vcs-Browser: http://bazaar.launchpad.net/~kubuntu-packagers/kubuntu-packaging/pykde4
+Vcs-Bzr: https://code.launchpad.net/~kubuntu-packagers/kubuntu-packaging/pykde4
+X-Debian-Vcs-Git: git://anonscm.debian.org/pkg-kde/kde-sc/pykde4.git
+X-Debian-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-kde/kde-sc/pykde4.git
 
 Package: python-kde4
 Architecture: any
-Depends: python-qt4 (>= 4.8.3-3~),
-         python-sip,
-         ${misc:Depends},
-         ${python:Depends},
-         ${shlibs:Depends},
-         ${sip:Depends}
+Depends: ${shlibs:Depends}, ${python:Depends}, ${misc:Depends},
+ python-qt4 (>= 4.8.3-3~), ${sip:Depends}, python-sip
 Suggests: ${shlibs:Suggests}
-Provides: ${python:Provides}
 Breaks: plasma-scriptengine-python (<< 4:4.6.5), python-qt4 (<< 4.8.3-3~)
 Description: Python bindings for the KDE Development Platform
  This package contains PyKDE, the Python bindings for the KDE
@@ -61,7 +44,6 @@ Description: Python bindings for the KDE
   * kterminal
   * ktexteditor
   * kutils
-  * nepomuk
   * plasma
   * solid
  .
@@ -75,8 +57,7 @@ Description: Python bindings for the KDE
 
 Package: python-kde4-dev
 Architecture: all
-Depends: python-kde4 (>= ${source:Version}) | python3-pykde4 (>= ${source:Version}),
-         ${misc:Depends}
+Depends: ${misc:Depends}, python-kde4 (>= ${source:Version}), python-qt4 (>= 4.8.3-3~)
 Breaks: python-kde4 (<< ${source:Version})
 Description: UIC compiler and SIP files for PyKDE
  This package contains pykdeuic4, a wrapper around PyQt's own UIC (user
@@ -101,10 +82,7 @@ Package: python-kde4-dbg
 Section: debug
 Architecture: any
 Priority: extra
-Depends: kdelibs5-dbg,
-         python-dbg,
-         python-kde4 (= ${binary:Version}),
-         ${misc:Depends}
+Depends: ${misc:Depends}, kdelibs5-dbg, python-kde4 (= ${binary:Version}), python-dbg
 Recommends: python-qt4-dbg
 Breaks: kdebindings-dbg
 Replaces: kdebindings-dbg
@@ -116,13 +94,8 @@ Description: debugging symbols for the P
 
 Package: python3-pykde4
 Architecture: any
-Depends: python3-pyqt4,
-         python3-sip,
-         ${misc:Depends},
-         ${python3:Depends},
-         ${shlibs:Depends},
-         ${sip3:Depends}
-Provides: ${python3:Provides}
+Depends: ${shlibs:Depends}, ${python3:Depends}, ${misc:Depends},
+ python3-pyqt4, ${sip3:Depends}, python3-sip
 Description: Python 3 bindings for the KDE Development Platform
  This package contains PyKDE, the Python 3 bindings for the KDE
  libraries, that allow you to write KDE programs using Python 3 instead of
@@ -139,7 +112,6 @@ Description: Python 3 bindings for the K
   * kterminal
   * ktexteditor
   * kutils
-  * nepomuk
   * plasma
   * solid
  .
@@ -155,14 +127,11 @@ Package: python3-pykde4-dbg
 Section: debug
 Architecture: any
 Priority: extra
-Depends: kdelibs5-dbg,
-         python3-dbg,
-         python3-pykde4 (= ${binary:Version}),
-         ${misc:Depends},
-         ${python3:Depends}
+Depends: ${misc:Depends}, kdelibs5-dbg, python3-pykde4 (= ${binary:Version}), python3-dbg
 Recommends: python3-pyqt4-dbg
 Description: debugging symbols for PyKDE bindings for Python 3
  This package contains debugging files used to investigate problems with
  Python 3 bindings for the KDE Development Platform. Install this package if
  you are experiencing crashes of the PyKDE application and wish to report a
  problem to the developers.
+
diff -pruN 4:4.14.0-1/debian/copyright 4:4.14.2-0ubuntu9/debian/copyright
--- 4:4.14.0-1/debian/copyright	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/copyright	2015-08-24 16:03:16.000000000 +0000
@@ -115,7 +115,7 @@ Specific licensing information:
   2. Redistributions in binary form must reproduce the copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
-  3. The name of the author may not be used to endorse or promote products
+  3. The name of the author may not be used to endorse or promote products 
      derived from this software without specific prior written permission.
 
   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
diff -pruN 4:4.14.0-1/debian/not-installed 4:4.14.2-0ubuntu9/debian/not-installed
--- 4:4.14.0-1/debian/not-installed	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/not-installed	2015-08-24 16:03:16.000000000 +0000
@@ -5,22 +5,6 @@
 ./usr/lib/python2.7/dist-packages/PyQt4/uic/widget-plugins/kde4.pyc
 
 # dh_python3 renames them
-./usr/lib/python3/dist-packages/PyKDE4/akonadi.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/dnssd.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/kdecore.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/kdeui.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/khtml.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/kio.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/knewstuff.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/kparts.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/kterminal.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/ktexteditor.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/kutils.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/nepomuk.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/phonon.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/plasma.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/solid.cpython-32mu.so
-./usr/lib/python3/dist-packages/PyKDE4/soprano.cpython-32mu.so
 ./usr/lib/python3/dist-packages/PyKDE4/akonadi.cpython-33m.so
 ./usr/lib/python3/dist-packages/PyKDE4/dnssd.cpython-33m.so
 ./usr/lib/python3/dist-packages/PyKDE4/kdecore.cpython-33m.so
@@ -37,3 +21,20 @@
 ./usr/lib/python3/dist-packages/PyKDE4/plasma.cpython-33m.so
 ./usr/lib/python3/dist-packages/PyKDE4/solid.cpython-33m.so
 ./usr/lib/python3/dist-packages/PyKDE4/soprano.cpython-33m.so
+
+./usr/lib/python3/dist-packages/PyKDE4/akonadi.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/dnssd.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/kdecore.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/kdeui.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/khtml.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/kio.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/knewstuff.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/kparts.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/kterminal.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/ktexteditor.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/kutils.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/nepomuk.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/phonon.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/plasma.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/solid.cpython-34m.so
+./usr/lib/python3/dist-packages/PyKDE4/soprano.cpython-34m.so
diff -pruN 4:4.14.0-1/debian/patches/add_qt_kde_definitions.diff 4:4.14.2-0ubuntu9/debian/patches/add_qt_kde_definitions.diff
--- 4:4.14.0-1/debian/patches/add_qt_kde_definitions.diff	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/patches/add_qt_kde_definitions.diff	2015-08-24 16:03:16.000000000 +0000
@@ -5,11 +5,11 @@ Forwarded: no
 Last-Update: 2011-06-30
 Origin: vendor
 
-Index: pykde4/CMakeLists.txt
+Index: pykde4-4.13.97/CMakeLists.txt
 ===================================================================
---- pykde4.orig/CMakeLists.txt	2014-08-24 05:20:35.129395520 +0200
-+++ pykde4/CMakeLists.txt	2014-08-24 05:20:35.125395684 +0200
-@@ -33,6 +33,8 @@
+--- pykde4-4.13.97.orig/CMakeLists.txt
++++ pykde4-4.13.97/CMakeLists.txt
+@@ -33,6 +33,8 @@ set_package_properties(PythonInterp PROP
  
  include_directories(${KDE4_INCLUDES})
  
diff -pruN 4:4.14.0-1/debian/patches/cmake_no_bytecode.diff 4:4.14.2-0ubuntu9/debian/patches/cmake_no_bytecode.diff
--- 4:4.14.0-1/debian/patches/cmake_no_bytecode.diff	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/patches/cmake_no_bytecode.diff	1970-01-01 00:00:00.000000000 +0000
@@ -1,32 +0,0 @@
-Index: pykde4-4.8.4/cmake/modules/PythonMacros.cmake
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ pykde4-4.8.4/cmake/modules/PythonMacros.cmake	2013-05-20 01:35:17.817291741 -0400
-@@ -0,0 +1,27 @@
-+# Python macros
-+# ~~~~~~~~~~~~~
-+# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
-+# Cloned-and-hacked by Colin Watson <cjwatson@ubuntu.com>, removing bytecode
-+# support.
-+#
-+# Redistribution and use is allowed according to the terms of the BSD license.
-+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-+#
-+# This file defines the following macros:
-+#
-+# PYTHON_INSTALL (SOURCE_FILE DESINATION_DIR)
-+#     Install the SOURCE_FILE, which is a Python .py file, into the
-+#     destination directory during install.
-+
-+GET_FILENAME_COMPONENT(PYTHON_MACROS_MODULE_PATH ${CMAKE_CURRENT_LIST_FILE}  PATH)
-+
-+MACRO(PYTHON_INSTALL SOURCE_FILE DESINATION_DIR)
-+
-+  FIND_FILE(_python_compile_py PythonCompile.py PATHS ${CMAKE_MODULE_PATH})
-+
-+  ADD_CUSTOM_TARGET(compile_python_files ALL)
-+
-+  # Install the source file.
-+  INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR})
-+ENDMACRO(PYTHON_INSTALL)
-+
diff -pruN 4:4.14.0-1/debian/patches/fix_kpythonpluginfactory_build.diff 4:4.14.2-0ubuntu9/debian/patches/fix_kpythonpluginfactory_build.diff
--- 4:4.14.0-1/debian/patches/fix_kpythonpluginfactory_build.diff	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/patches/fix_kpythonpluginfactory_build.diff	2015-08-24 16:03:16.000000000 +0000
@@ -4,8 +4,10 @@ Forwarded: no
 Origin: vendor
 Last-Update: 2008-12-05
 
---- a/kpythonpluginfactory/kpythonpluginfactory.cpp
-+++ b/kpythonpluginfactory/kpythonpluginfactory.cpp
+Index: pykde4-4.9.80/kpythonpluginfactory/kpythonpluginfactory.cpp
+===================================================================
+--- pykde4-4.9.80.orig/kpythonpluginfactory/kpythonpluginfactory.cpp	2012-11-14 16:14:05.000000000 +0000
++++ pykde4-4.9.80/kpythonpluginfactory/kpythonpluginfactory.cpp	2012-11-19 17:23:32.497203781 +0000
 @@ -18,6 +18,7 @@
     Boston, MA 02111-1307, USA.
  */
diff -pruN 4:4.14.0-1/debian/patches/kpythonpluginfactory_3.2support.diff 4:4.14.2-0ubuntu9/debian/patches/kpythonpluginfactory_3.2support.diff
--- 4:4.14.0-1/debian/patches/kpythonpluginfactory_3.2support.diff	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/patches/kpythonpluginfactory_3.2support.diff	1970-01-01 00:00:00.000000000 +0000
@@ -1,42 +0,0 @@
-Index: b/kpythonpluginfactory/kpythonpluginfactory.cpp
-===================================================================
---- a/kpythonpluginfactory/kpythonpluginfactory.cpp
-+++ b/kpythonpluginfactory/kpythonpluginfactory.cpp
-@@ -33,6 +33,12 @@
- #define PY3
- #endif
- 
-+#if PY_MAJOR_VERSION >= 3
-+#if PY_MINOR_VERSION >= 2
-+#define PY3.2
-+#endif
-+#endif
-+
- /*
- This implements a plugin factory for running Python plugins. It also
- supports io-slaves with a kdemain() entry point.
-@@ -106,8 +112,13 @@ void KPythonPluginFactory::initialize()
-         kDebug() << "Initializing Python interpreter.";
-         pythonLib = LoadPythonLibrary();
- 
-+#ifdef PY3.2
-+        Py_Initialize ();
-+        PyEval_InitThreads ();
-+#else
-         PyEval_InitThreads ();
-         Py_Initialize ();
-+#endif
-         if (!Py_IsInitialized ())
-         {
-             //pythonInit = 0;
-@@ -117,8 +128,10 @@ void KPythonPluginFactory::initialize()
-         kDebug() << "Succesfully initialized Python interpreter.";
- 
-         threadState = PyThreadState_GET();
-+#ifndef PY3.2
-         // free the lock
-         PyEval_ReleaseLock();
-+#endif
-     }
- }
- 
diff -pruN 4:4.14.0-1/debian/patches/kubuntu_include_dirs.diff 4:4.14.2-0ubuntu9/debian/patches/kubuntu_include_dirs.diff
--- 4:4.14.0-1/debian/patches/kubuntu_include_dirs.diff	1970-01-01 00:00:00.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/patches/kubuntu_include_dirs.diff	2015-08-24 16:03:16.000000000 +0000
@@ -0,0 +1,35 @@
+Description: use multiarch include dirs
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+Index: pykde4-4.13.97/CMakeLists.txt
+===================================================================
+--- pykde4-4.13.97.orig/CMakeLists.txt
++++ pykde4-4.13.97/CMakeLists.txt
+@@ -8,6 +8,7 @@ find_package(KDE4 4.9.4 REQUIRED)
+ # Match what's used in the main macros
+ cmake_policy(SET CMP0002 OLD)
+ find_package(PythonLibrary)
++find_package(PythonLibs)
+ 
+ include(KDE4Defaults)
+ include(MacroLibrary)
+@@ -80,6 +81,7 @@ set_package_properties(PolkitQt PROPERTI
+                        "Required to build Python Polkit bindings")
+ 
+ include_directories(
++    ${PYTHON_INCLUDE_DIRS}
+     ${PYTHON_INCLUDE_PATH}
+     ${SIP_INCLUDE_DIR}
+     ${QT_INCLUDE_DIR}
diff -pruN 4:4.14.0-1/debian/patches/kubuntu_kpythonpluginfactory_3.2support.diff 4:4.14.2-0ubuntu9/debian/patches/kubuntu_kpythonpluginfactory_3.2support.diff
--- 4:4.14.0-1/debian/patches/kubuntu_kpythonpluginfactory_3.2support.diff	1970-01-01 00:00:00.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/patches/kubuntu_kpythonpluginfactory_3.2support.diff	2015-08-24 16:03:16.000000000 +0000
@@ -0,0 +1,42 @@
+Index: b/kpythonpluginfactory/kpythonpluginfactory.cpp
+===================================================================
+--- a/kpythonpluginfactory/kpythonpluginfactory.cpp
++++ b/kpythonpluginfactory/kpythonpluginfactory.cpp
+@@ -33,6 +33,12 @@
+ #define PY3
+ #endif
+ 
++#if PY_MAJOR_VERSION >= 3
++#if PY_MINOR_VERSION >= 2
++#define PY3.2
++#endif
++#endif
++
+ /*
+ This implements a plugin factory for running Python plugins. It also
+ supports io-slaves with a kdemain() entry point.
+@@ -106,8 +112,13 @@ void KPythonPluginFactory::initialize()
+         kDebug() << "Initializing Python interpreter.";
+         pythonLib = LoadPythonLibrary();
+ 
++#ifdef PY3.2
++        Py_Initialize ();
++        PyEval_InitThreads ();
++#else
+         PyEval_InitThreads ();
+         Py_Initialize ();
++#endif
+         if (!Py_IsInitialized ())
+         {
+             //pythonInit = 0;
+@@ -117,8 +128,10 @@ void KPythonPluginFactory::initialize()
+         kDebug() << "Succesfully initialized Python interpreter.";
+ 
+         threadState = PyThreadState_GET();
++#ifndef PY3.2
+         // free the lock
+         PyEval_ReleaseLock();
++#endif
+     }
+ }
+ 
diff -pruN 4:4.14.0-1/debian/patches/make_pykde4_respect_sip_flags.diff 4:4.14.2-0ubuntu9/debian/patches/make_pykde4_respect_sip_flags.diff
--- 4:4.14.0-1/debian/patches/make_pykde4_respect_sip_flags.diff	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/patches/make_pykde4_respect_sip_flags.diff	2015-08-24 16:03:16.000000000 +0000
@@ -7,11 +7,11 @@ Last-Update: 2009-04-15
 Corrects FTBFS on armel by making sure pykde4 properly parses the python-qt4
 flags passed from PythonQt4's cmake file.
 
-Index: pykde4/CMakeLists.txt
+Index: pykde4-4.13.97/CMakeLists.txt
 ===================================================================
---- pykde4.orig/CMakeLists.txt	2014-08-24 05:20:42.953073667 +0200
-+++ pykde4/CMakeLists.txt	2014-08-24 05:21:35.606907685 +0200
-@@ -101,6 +101,9 @@
+--- pykde4-4.13.97.orig/CMakeLists.txt
++++ pykde4-4.13.97/CMakeLists.txt
+@@ -101,6 +101,9 @@ include_directories(
      ${KDEPIMLIBS_INCLUDE_DIRS}
  )
  
@@ -21,7 +21,7 @@ Index: pykde4/CMakeLists.txt
  set(SIP_INCLUDES ${CMAKE_BINARY_DIR} ${PYQT4_SIP_DIR} sip)
  set(SIP_CONCAT_PARTS 8)
  if (WIN32)
-@@ -108,7 +111,7 @@
+@@ -108,7 +111,7 @@ if (WIN32)
  else ()
      set(SIP_TAGS ALL WS_X11 ${PYQT4_VERSION_TAG})
  endif ()
diff -pruN 4:4.14.0-1/debian/patches/new_pyincludes.diff 4:4.14.2-0ubuntu9/debian/patches/new_pyincludes.diff
--- 4:4.14.0-1/debian/patches/new_pyincludes.diff	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/patches/new_pyincludes.diff	1970-01-01 00:00:00.000000000 +0000
@@ -1,22 +0,0 @@
-Index: pykde4/CMakeLists.txt
-===================================================================
---- pykde4.orig/CMakeLists.txt	2014-08-24 05:23:50.441361898 +0200
-+++ pykde4/CMakeLists.txt	2014-08-24 05:23:50.437362061 +0200
-@@ -19,6 +19,7 @@
- set(CMAKE_MODULE_PATH ${pykde4_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
- 
- find_package(PythonLibrary)
-+find_package(PythonLibs)
- 
- set_package_properties(KDE4 PROPERTIES DESCRIPTION "The KDE libraries"
-                        URL "http://www.kde.org" TYPE REQUIRED
-@@ -77,7 +78,8 @@
-                        "Required to build Python Polkit bindings")
- 
- include_directories(
--    ${PYTHON_INCLUDE_PATH}
-+    ${PYTHON_INCLUDE_DIR}
-+    ${PYTHON_INCLUDE_DIR2}
-     ${SIP_INCLUDE_DIR}
-     ${QT_INCLUDE_DIR}
-     ${QT_QT_INCLUDE_DIR}
diff -pruN 4:4.14.0-1/debian/patches/optional_install_sip_files.diff 4:4.14.2-0ubuntu9/debian/patches/optional_install_sip_files.diff
--- 4:4.14.0-1/debian/patches/optional_install_sip_files.diff	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/patches/optional_install_sip_files.diff	2015-08-24 16:03:16.000000000 +0000
@@ -2,15 +2,15 @@ From: Sune Vuorela <sune@debian.org>
 Subject: Install sip files only when building for default python version
 Forwarded: not-needed
 Origin: vendor
-Last-Update: 2013-02-12
+Last-Update: 2011-07-01
 
 Make it possible to only install the sip files under some conditions
 
-Index: pykde4/CMakeLists.txt
+Index: pykde4-4.14.1/CMakeLists.txt
 ===================================================================
---- pykde4.orig/CMakeLists.txt	2014-08-24 05:22:34.384489997 +0200
-+++ pykde4/CMakeLists.txt	2014-08-24 05:23:38.197865431 +0200
-@@ -260,15 +260,20 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -252,16 +252,21 @@ python_install(__init__.py ${PYTHON_SITE
  # Install the .sip files for anyone that wants to build bindings on top of PyKDE4.
  # (Don't forget the / at the end of sip/.)
  install(FILES ${CMAKE_BINARY_DIR}/pykde_config.sip DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4/)
@@ -19,13 +19,13 @@ Index: pykde4/CMakeLists.txt
 -    PATTERN ".svn" EXCLUDE
 -    PATTERN "*.in" EXCLUDE)
 +if(DEFAULT_PYTHON_VERSION)
-+    install(DIRECTORY sip/ DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4
++  install(DIRECTORY sip/ DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4
 +        PATTERN "*~" EXCLUDE    # This sucks, why can't I just whitelist what I _do_ want?
 +        PATTERN ".svn" EXCLUDE
 +        PATTERN "*.in" EXCLUDE)
-+    message("Installing sip files in this build pass")
++   message("Installing sip files in this build pass")
 +else(DEFAULT_PYTHON_VERSION)
-+    message("Not installing sip files in this build pass")
++   message("Not installing sip files in this build pass")
 +endif(DEFAULT_PYTHON_VERSION)
  
  add_subdirectory(tools)
@@ -34,5 +34,7 @@ Index: pykde4/CMakeLists.txt
 -if (PYTHON_VERSION_MAJOR LESS 3)
 +if (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION)
      add_subdirectory(kpythonpluginfactory)
- endif ()
+-endif ()
++endif (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION)
  
+ feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff -pruN 4:4.14.0-1/debian/patches/python3.3.diff 4:4.14.2-0ubuntu9/debian/patches/python3.3.diff
--- 4:4.14.0-1/debian/patches/python3.3.diff	1970-01-01 00:00:00.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/patches/python3.3.diff	2015-08-24 16:03:16.000000000 +0000
@@ -0,0 +1,14 @@
+Index: pykde4-4.13.97/CMakeLists.txt
+===================================================================
+--- pykde4-4.13.97.orig/CMakeLists.txt
++++ pykde4-4.13.97/CMakeLists.txt
+@@ -13,6 +13,9 @@ include(KDE4Defaults)
+ include(MacroLibrary)
+ include(PythonMacros)
+ include(FeatureSummary)
++find_package(PkgConfig REQUIRED)
++# this doesn't work ...
++pkg_check_modules(PYTHON xpython${_CURRENT_VERSION})
+ 
+ option(PYKDEUIC4_ALTINSTALL "Enable parallel-installation of the PyKDE4 tools" FALSE)
+ 
diff -pruN 4:4.14.0-1/debian/patches/python_modules_dont_link_against_libpython.diff 4:4.14.2-0ubuntu9/debian/patches/python_modules_dont_link_against_libpython.diff
--- 4:4.14.0-1/debian/patches/python_modules_dont_link_against_libpython.diff	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/patches/python_modules_dont_link_against_libpython.diff	2015-08-24 16:03:16.000000000 +0000
@@ -2,17 +2,17 @@ From: Adeodato Simó <adeodato@debian.or
 Subject: Do not let python modules link against libpython.
 Forwarded: no
 Origin: vendor
-Last-Update: 2013-02-12
+Last-Update: 2008-01-25
 
 Do not link python modules against -lpython2.X. Since KDE4's cmake file
 uses --no-undefined by default, we have to remove that from the default
 CMAKE_SHARED_LINKER_FLAGS variable, but only for the pykde4 subdirectory.
 
-Index: pykde4/CMakeLists.txt
+Index: pykde4-4.13.97/CMakeLists.txt
 ===================================================================
---- pykde4.orig/CMakeLists.txt	2014-08-24 05:20:28.393672620 +0200
-+++ pykde4/CMakeLists.txt	2014-08-24 05:20:28.389672785 +0200
-@@ -152,6 +152,9 @@
+--- pykde4-4.13.97.orig/CMakeLists.txt
++++ pykde4-4.13.97/CMakeLists.txt
+@@ -152,6 +152,9 @@ if (NOT _exit_code)
      python_install(${CMAKE_CURRENT_BINARY_DIR}/pykdeconfig.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKDE4)
  endif ()
  
diff -pruN 4:4.14.0-1/debian/patches/pythonpluginfactory_python3.diff 4:4.14.2-0ubuntu9/debian/patches/pythonpluginfactory_python3.diff
--- 4:4.14.0-1/debian/patches/pythonpluginfactory_python3.diff	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/patches/pythonpluginfactory_python3.diff	2015-08-24 16:03:16.000000000 +0000
@@ -4,10 +4,10 @@ Note: It is OK for the Python and Python
 because of the version specific ABI tags in Python 3 so files and the fact
 that Python 3 interpreters will search for those first.
 Copyright (C) 2012 Barry A. Warsaw <barry@python.org>
-Index: pykde4/kpythonpluginfactory/kpythonpluginfactory.cpp
+Index: pykde4-4.13.97/kpythonpluginfactory/kpythonpluginfactory.cpp
 ===================================================================
---- pykde4.orig/kpythonpluginfactory/kpythonpluginfactory.cpp	2014-08-24 05:23:56.005133082 +0200
-+++ pykde4/kpythonpluginfactory/kpythonpluginfactory.cpp	2014-08-24 05:23:56.001133247 +0200
+--- pykde4-4.13.97.orig/kpythonpluginfactory/kpythonpluginfactory.cpp
++++ pykde4-4.13.97/kpythonpluginfactory/kpythonpluginfactory.cpp
 @@ -29,6 +29,10 @@
  #include <kcomponentdata.h>
  #include <kdebug.h>
@@ -19,7 +19,7 @@ Index: pykde4/kpythonpluginfactory/kpyth
  /*
  This implements a plugin factory for running Python plugins. It also
  supports io-slaves with a kdemain() entry point.
-@@ -347,17 +351,48 @@
+@@ -347,17 +351,48 @@ int kdemain( int argc, char **argv )
      PyObject *pModule;
      char *protocol = argv[1];
  
@@ -70,7 +70,7 @@ Index: pykde4/kpythonpluginfactory/kpyth
  
      QString completePath = KStandardDirs::locate("data", QString("kio_python/%1/%2.py").arg(protocol).arg(protocol));
      kDebug() << "Path to Python kioslace is " << completePath;
-@@ -388,8 +423,8 @@
+@@ -388,8 +423,8 @@ int kdemain( int argc, char **argv )
      }
      PyObject *pClass, *pArgs, *pArg1, *pArg2;
      pArgs = PyTuple_New(2);
@@ -81,19 +81,20 @@ Index: pykde4/kpythonpluginfactory/kpyth
      PyTuple_SetItem(pArgs, 0, pArg1);
      PyTuple_SetItem(pArgs, 1, pArg2);
      RunFunction(factoryFunction, pArgs);
-Index: pykde4/CMakeLists.txt
+Index: pykde4-4.13.97/CMakeLists.txt
 ===================================================================
---- pykde4.orig/CMakeLists.txt	2014-08-24 05:23:56.005133082 +0200
-+++ pykde4/CMakeLists.txt	2014-08-24 05:23:56.001133247 +0200
-@@ -275,7 +275,10 @@
+--- pykde4-4.13.97.orig/CMakeLists.txt
++++ pykde4-4.13.97/CMakeLists.txt
+@@ -275,8 +275,10 @@ endif(DEFAULT_PYTHON_VERSION)
  add_subdirectory(tools)
  #add_subdirectory(docs)
  add_subdirectory(examples)
 -if (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION)
-+if ((PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION) OR
-+    PYTHON_VERSION_MAJOR GREATER 2)
 +# Due to version specific ABI tagging in Python 3 so files, we can build for
 +# all Python 3 versions without a problem.
++if ((PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION) OR PYTHON_VERSION_MAJOR GREATER 2)
      add_subdirectory(kpythonpluginfactory)
- endif ()
+-endif (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION)
++endif ((PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION) OR PYTHON_VERSION_MAJOR GREATER 2)
  
+ feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff -pruN 4:4.14.0-1/debian/patches/series 4:4.14.2-0ubuntu9/debian/patches/series
--- 4:4.14.0-1/debian/patches/series	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/patches/series	2015-08-24 16:03:16.000000000 +0000
@@ -4,7 +4,7 @@ fix_kpythonpluginfactory_build.diff
 make_pykde4_respect_sip_flags.diff
 pythonpluginfactory_use_versioned_python_lib.diff
 optional_install_sip_files.diff
-new_pyincludes.diff
-cmake_no_bytecode.diff
+python3.3.diff
 pythonpluginfactory_python3.diff
-kpythonpluginfactory_3.2support.diff
+kubuntu_include_dirs.diff
+kubuntu_kpythonpluginfactory_3.2support.diff
diff -pruN 4:4.14.0-1/debian/python3-pykde4.lintian-overrides 4:4.14.2-0ubuntu9/debian/python3-pykde4.lintian-overrides
--- 4:4.14.0-1/debian/python3-pykde4.lintian-overrides	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/python3-pykde4.lintian-overrides	1970-01-01 00:00:00.000000000 +0000
@@ -1,4 +0,0 @@
-python3-pykde4: hardening-no-fortify-functions usr/lib/python3/dist-packages/PyKDE4/kdecore.cpython-32mu.so
-python3-pykde4: hardening-no-fortify-functions usr/lib/python3/dist-packages/PyKDE4/kdeui.cpython-32mu.so
-# python3 module
-python3-pykde4: python-script-but-no-python-dep usr/lib/python3/dist-packages/PyQt4/uic/pykdeuic4.py
diff -pruN 4:4.14.0-1/debian/python-kde4-dev.install 4:4.14.2-0ubuntu9/debian/python-kde4-dev.install
--- 4:4.14.0-1/debian/python-kde4-dev.install	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/python-kde4-dev.install	2015-08-24 16:03:16.000000000 +0000
@@ -1,4 +1,3 @@
 usr/bin/pykdeuic4
-usr/bin/pykdeuic4-2.7
-usr/bin/pykdeuic4-3.*
+usr/bin/pykdeuic4-*
 usr/share/sip/PyKDE4
diff -pruN 4:4.14.0-1/debian/python-kde4-doc.install 4:4.14.2-0ubuntu9/debian/python-kde4-doc.install
--- 4:4.14.0-1/debian/python-kde4-doc.install	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/python-kde4-doc.install	2015-08-24 16:03:16.000000000 +0000
@@ -1,3 +1,4 @@
 #usr/share/doc/kde/HTML/en/pykde4/
-docs/html	usr/share/doc/python-kde4-doc/
 usr/share/kde4/apps/pykde4/examples
+
+docs/html	usr/share/doc/python-kde4-doc/
diff -pruN 4:4.14.0-1/debian/python-kde4.lintian-overrides 4:4.14.2-0ubuntu9/debian/python-kde4.lintian-overrides
--- 4:4.14.0-1/debian/python-kde4.lintian-overrides	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/python-kde4.lintian-overrides	2015-08-24 16:03:16.000000000 +0000
@@ -1,5 +1 @@
 python-kde4: maintainer-script-ignores-errors postinst
-python-kde4: hardening-no-fortify-functions usr/lib/python2.6/dist-packages/PyKDE4/kdecore.so
-python-kde4: hardening-no-fortify-functions usr/lib/python2.6/dist-packages/PyKDE4/kdeui.so
-python-kde4: hardening-no-fortify-functions usr/lib/python2.7/dist-packages/PyKDE4/kdecore.so
-python-kde4: hardening-no-fortify-functions usr/lib/python2.7/dist-packages/PyKDE4/kdeui.so
diff -pruN 4:4.14.0-1/debian/rules 4:4.14.2-0ubuntu9/debian/rules
--- 4:4.14.0-1/debian/rules	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/rules	2015-08-24 16:03:16.000000000 +0000
@@ -9,6 +9,8 @@ pydefaultversion = $(shell pyversions -v
 pyshared_nondefault = $(foreach v,$(filter-out $(pydefaultversion),$(pyversions)),\
     usr/lib/pyshared/python$v/PyKDE4 usr/lib/python$v/dist-packages/PyKDE4)
 py3versions = $(shell py3versions -vr)
+PYTHONDONTWRITEBYTECODE = True
+export PYTHONDONTWRITEBYTECODE
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
@@ -21,14 +23,13 @@ override_dh_auto_configure:
 	$(if $(pyversions),,$(error "no suitable pythonversion found, failing"))
 	$(foreach v,$(pyversions),$(overridden_command) --builddirectory=builddir-$v -- \
 	    -DPYTHON_EXECUTABLE=/usr/bin/python$v \
-	    -DPYTHON_INCLUDE_DIR=/usr/include/python$v \
+	    -DPYTHON_INCLUDE_PATH=/usr/include/python$v \
 	    -DPYTHON_INCLUDE_DIR2=/usr/include/$(DEB_HOST_MULTIARCH)/python$v \
-	    -DPYTHON_LIBRARY=/usr/lib/$(DEB_HOST_MULTIARCH)/libpython$(v).so \
 	    -DDEFAULT_PYTHON_VERSION=$(if $(filter $(pydefaultversion),$v),true,false) \
 	    $(nl))
 	$(foreach v,$(py3versions),$(overridden_command) --builddirectory=builddir-$v -- \
 	    -DPYTHON_EXECUTABLE=/usr/bin/python$v \
-	    -DPYTHON_INCLUDE_DIR=/usr/include/python$v$(if $(filter 3.2,$(v)),mu,m) \
+	    -DPYTHON_INCLUDE_PATH=/usr/include/python$v$(if $(filter 3.2,$(v)),mu,m) \
 	    -DPYTHON_INCLUDE_DIR2=/usr/include/$(DEB_HOST_MULTIARCH)/python$v$(if $(filter 3.2,$(v)),mu,m) \
 	    -DPYTHON_LIBRARY=/usr/lib/$(if $(filter 3.2,$(v)),libpython3.2mu.so,$(DEB_HOST_MULTIARCH)/libpython$(v)m.so) \
 	    -DPYTHON_SITE_PACKAGES_INSTALL_DIR=/usr/lib/python3/dist-packages \
@@ -42,17 +43,14 @@ override_dh_auto_build override_dh_auto_
 override_dh_auto_install:
 	$(foreach v,$(pyversions),dh_auto_install --builddirectory=builddir-$v $(nl))
 	$(foreach v,$(py3versions),dh_auto_install --builddirectory=builddir-$v --destdir=debian/tmp-$v $(nl) ABITAG=`python$(v) -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))"`; for f in `find debian/tmp-$v/ -name '*.so' ! -name '*.cpython*.so'`; do mv $$f $${f%.so}.$$ABITAG.so; done;)
-	set -e && for i in $(py3versions); do \
-	  mv debian/tmp-$$i/usr/bin/pykdeuic4 debian/tmp/usr/bin/pykdeuic4-$$i ; \
-	  cp -rv debian/tmp-$$i/* debian/tmp/ ; \
-	done
+	$(foreach v,$(py3versions), cp -rv debian/tmp-$v/* debian/tmp/ $(nl))
 
 override_dh_python3:
 	$(overridden_command)
 	dh_sip3 -ppython3-pykde4
 
 override_dh_python2:
-	$(overridden_command)
+	$(overridden_command) --no-shebang-rewrite
 	dh_sip -ppython-kde4
 
 override_dh_strip:
@@ -61,7 +59,7 @@ override_dh_strip:
 
 override_dh_shlibdeps:
 	if [ -d debian/python-kde4 ]; then \
-	  dh_shlibdeps -ppython-kde4 $(foreach s,$(pyshared_nondefault),-X'$s/') -- \
-	    -dSuggests $(foreach s,$(pyshared_nondefault),debian/python-kde4/$s/*.so) -dDepends; \
+        dh_shlibdeps -ppython-kde4 $(foreach s,$(pyshared_nondefault),-X'$s/') -- \
+	-dSuggests $(foreach s,$(pyshared_nondefault),debian/python-kde4/$s/*.so) -dDepends; \
 	fi
 	$(overridden_command) --remaining-packages
diff -pruN 4:4.14.0-1/debian/watch 4:4.14.2-0ubuntu9/debian/watch
--- 4:4.14.0-1/debian/watch	2014-08-24 03:25:08.000000000 +0000
+++ 4:4.14.2-0ubuntu9/debian/watch	2015-08-24 16:03:16.000000000 +0000
@@ -1,2 +1,2 @@
 version=3
-http://download.kde.org/stable/([\d.]+)/src/pykde4-([\d.]+).tar.xz
+ftp://ftp.kde.org/pub/kde/unstable/([\d\.]*)/src/pykde4-([\d\.]*).tar.xz
diff -pruN 4:4.14.0-1/.pc/applied-patches 4:4.14.2-0ubuntu9/.pc/applied-patches
--- 4:4.14.0-1/.pc/applied-patches	2017-11-22 07:27:36.787451821 +0000
+++ 4:4.14.2-0ubuntu9/.pc/applied-patches	2017-11-22 07:27:37.343467337 +0000
@@ -4,7 +4,7 @@ fix_kpythonpluginfactory_build.diff
 make_pykde4_respect_sip_flags.diff
 pythonpluginfactory_use_versioned_python_lib.diff
 optional_install_sip_files.diff
-new_pyincludes.diff
-cmake_no_bytecode.diff
+python3.3.diff
 pythonpluginfactory_python3.diff
-kpythonpluginfactory_3.2support.diff
+kubuntu_include_dirs.diff
+kubuntu_kpythonpluginfactory_3.2support.diff
diff -pruN 4:4.14.0-1/.pc/kpythonpluginfactory_3.2support.diff/kpythonpluginfactory/kpythonpluginfactory.cpp 4:4.14.2-0ubuntu9/.pc/kpythonpluginfactory_3.2support.diff/kpythonpluginfactory/kpythonpluginfactory.cpp
--- 4:4.14.0-1/.pc/kpythonpluginfactory_3.2support.diff/kpythonpluginfactory/kpythonpluginfactory.cpp	2017-11-22 07:27:36.000000000 +0000
+++ 4:4.14.2-0ubuntu9/.pc/kpythonpluginfactory_3.2support.diff/kpythonpluginfactory/kpythonpluginfactory.cpp	1970-01-01 00:00:00.000000000 +0000
@@ -1,439 +0,0 @@
-/* Copyright 2003 Jim Bublitz <jbublitz@nwinternet.com>
-   Copyright 2008 Simon Edwards <simon@simonzone.com>
-   Copyright 2008 David Boddie <david@boddie.org.uk>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.
-*/
-
-#include <Python.h>
-#include <QtCore/QCoreApplication>
-#include <QFileInfo>
-#include <QDir>
-#include <QSet>
-#include <klibloader.h>
-#include <kstandarddirs.h>
-#include <kcmodule.h>
-#include <kcomponentdata.h>
-#include <kdebug.h>
-
-#if PY_MAJOR_VERSION >= 3
-#define PY3
-#endif
-
-/*
-This implements a plugin factory for running Python plugins. It also
-supports io-slaves with a kdemain() entry point.
-*/
-
-class KPythonPluginFactory : public KPluginFactory
-{
-    public:
-        KPythonPluginFactory(const char *name=0);
-        ~KPythonPluginFactory();
-
-        static PyThreadState *threadState;
-
-    protected:
-        virtual QObject *create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword);
-    private:
-        void initialize();
-        QLibrary *pythonLib;
-        static QSet<QString> loadedKeywords;
-};
-QSet<QString> KPythonPluginFactory::loadedKeywords;
-PyThreadState *KPythonPluginFactory::threadState = 0;
-
-K_EXPORT_PLUGIN(KPythonPluginFactory("kpythonpluginfactory"))
-K_GLOBAL_STATIC(KComponentData, KPythonPluginFactory_factorycomponentdata)
-
-bool AppendToSysPath (QString newPath);
-PyObject *ImportModule (QString moduleName);
-QLibrary *LoadPythonLibrary();
-PyObject *RunFunction(PyObject *object, PyObject *args);
-
-// This cleanup function is run just before program unload but before
-// any static data is destroyed. It makes sure that the interpreter
-// is shutdown before the PyQt shared libraries etc are unloaded.
-static void KPythonPluginFactoryCleanup_PostRoutine()
-{
-    PyThreadState *tstate = PyThreadState_GET();
-    if (!tstate)
-    {
-        // Ensure that thread state is not null.
-        PyThreadState_Swap(KPythonPluginFactory::threadState);
-    }
-    if (Py_IsInitialized())
-    {
-        Py_Finalize();
-    }
-}
-
-KPythonPluginFactory::KPythonPluginFactory(const char *name) : KPluginFactory(name)
-{
-    pythonLib = 0;
-
-    kDebug() << "KPythonPluginFactory::KPythonPluginFactory()";
-
-    qAddPostRoutine(KPythonPluginFactoryCleanup_PostRoutine);
-
-    if (KPythonPluginFactory_factorycomponentdata->isValid())
-    {
-        setComponentData(*KPythonPluginFactory_factorycomponentdata); \
-    }
-    else
-    {
-        *KPythonPluginFactory_factorycomponentdata = KPluginFactory::componentData();
-    }
-}
-
-void KPythonPluginFactory::initialize()
-{
-   if (!Py_IsInitialized ())
-   {
-        kDebug() << "Initializing Python interpreter.";
-        pythonLib = LoadPythonLibrary();
-
-        PyEval_InitThreads ();
-        Py_Initialize ();
-        if (!Py_IsInitialized ())
-        {
-            //pythonInit = 0;
-            return;
-        }
-
-        kDebug() << "Succesfully initialized Python interpreter.";
-
-        threadState = PyThreadState_GET();
-        // free the lock
-        PyEval_ReleaseLock();
-    }
-}
-
-QObject *KPythonPluginFactory::create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword)
-{
-    initialize();
-
-    kDebug() << "KPythonPluginFactory::create iface: " << iface;
-    kDebug() << "keyword to be used for finding the plugin code: " << keyword;
-    QString completePath = KStandardDirs::locate("data", keyword);
-    kDebug() << "Path to plugin code is: " << completePath;
-
-    if (completePath.isEmpty())
-    {
-        kError() << "Unable to find plugin code: " << keyword;
-        return 0;
-    }
-
-    QFileInfo pathInfo(completePath);
-    QString path = pathInfo.absoluteDir().absolutePath();
-    QString scriptName = pathInfo.baseName();
-
-    bool loaded = loadedKeywords.contains(keyword);
-
-    // Set up the Python module path.
-    if (!loaded)
-    {
-        if(!AppendToSysPath(path.toLatin1().data()))
-        {
-            kError() << "Failed to set sys.path to " << path;
-            return 0;
-        }
-    }
-
-    // Load the Python script.
-    PyObject *pyModule = ImportModule(scriptName);
-    if(!pyModule)
-    {
-        kError() << "Failed to import module";
-        PyErr_Print();
-        return 0;
-    }
-
-
-    PyGILState_STATE gstate;
-    gstate = PyGILState_Ensure();
-
-    if (!loaded) {
-        // Inject a helper function
-        QString bridge = QString("def kpythonpluginfactory_bridge(parentWidget,parent,componentData):\n"
-                                "    import sip\n"
-                                "    from PyQt4 import QtCore\n"
-                                "    from PyQt4 import QtGui\n"
-                                "    from PyKDE4 import kdecore\n"
-                                "    if parentWidget!=0:\n"
-                                "        wparentWidget = sip.wrapinstance(parent,QtGui.QWidget)\n"
-                                "    else:\n"
-                                "        wparentWidget = None\n"
-                                "    if parent!=0:\n"
-                                "        wparent = sip.wrapinstance(parent,QtCore.QObject)\n"
-                                "    else:\n"
-                                "        wparent = None\n"
-                                "    if componentData!=0:\n"
-                                "        wcomponentData = sip.wrapinstance(componentData,kdecore.KComponentData)\n"
-                                "    else:\n"
-                                "        wcomponentData = None\n"
-                                "    inst = CreatePlugin(wparentWidget,wparent,wcomponentData)\n"
-                                "    return (inst,sip.unwrapinstance(inst))\n");
-        PyRun_String(bridge.toLatin1().data(), Py_file_input, PyModule_GetDict(pyModule), PyModule_GetDict(pyModule));
-    }
-
-    // Get the Python module's factory function.
-    PyObject *factoryFunction = PyObject_GetAttrString(pyModule, "kpythonpluginfactory_bridge");
-    if(!factoryFunction)
-    {
-        kDebug() << "Failed to find factory function";
-        PyGILState_Release(gstate);
-        return 0;
-    }
-
-    if (!loaded)
-    {
-        registerPlugin<KCModule>(keyword,0);//,&QObject::staticMetaObject,0);
-    }
-
-    loadedKeywords << keyword;
-
-    // Call the factory function. Set up the args.
-    PyObject *pyParentWidget = PyLong_FromVoidPtr(parentWidget);
-    PyObject *pyParent = PyLong_FromVoidPtr(parent);
-    PyObject *pyComponentData = PyLong_FromVoidPtr(KPythonPluginFactory_factorycomponentdata);
-
-    // Using NNN here is effect gives our references to the arguement away.
-    PyObject *functionArgs = Py_BuildValue ("NNN", pyParentWidget, pyParent, pyComponentData);
-    PyObject *pyResultTuple = 0;
-    if(pyParentWidget && pyParent && functionArgs)
-    {
-        // run the factory function
-        pyResultTuple = RunFunction(factoryFunction, functionArgs);
-        if(!pyResultTuple)
-        {
-            kError() << "Error while running factory function for Python plugin: " << keyword;
-            PyErr_Print();
-            PyGILState_Release(gstate);
-            return 0;
-        }
-    }
-    else
-    {
-        kError() << "Failed to create args.";
-        PyGILState_Release(gstate);
-        return 0;
-    }
-    // cleanup a bit
-    Py_XDECREF(functionArgs);
-    Py_XDECREF(factoryFunction);
-
-    // Stop this from getting garbage collected.
-    Py_INCREF(PyTuple_GET_ITEM(pyResultTuple,0));
-
-    // convert the KCModule PyObject to a real C++ KCModule *.
-    PyObject *pyQObject;
-    pyQObject = PyTuple_GET_ITEM(pyResultTuple,1);
-    QObject *resultQObject = (QObject *)PyLong_AsVoidPtr(pyQObject);
-    if(!resultQObject)
-    {
-        kError() << "Failed sip conversion to C++ pointer";
-        PyGILState_Release(gstate);
-        return 0;
-    }
-    Py_XDECREF(pyResultTuple);
-
-    // take care of any translation info
-//    KGlobal::locale()->insertCatalogue(script);
-    kDebug() << "Returning result qobject";
-    PyGILState_Release(gstate);
-    return resultQObject;
-}
-
-KPythonPluginFactory::~KPythonPluginFactory()
-{
-    kDebug() << "KPythonPluginFactory::~KPythonPluginFactory()";
-    if (Py_IsInitialized())
-    {
-        Py_Finalize();
-    }
-    if (pythonLib)
-    {
-        delete pythonLib;
-    }
-}
-
-bool AppendToSysPath (QString newPath)
-{
-    if (newPath.isEmpty())
-    {
-        return false;
-    }
-
-    PyGILState_STATE gstate;
-    gstate = PyGILState_Ensure();
-
-    QString line = QString("import sys\nif not '%1' in sys.path:\n\tsys.path.append ('%2')\n")
-                           .arg(newPath).arg(newPath);
-    bool rc = PyRun_SimpleString (line.toLatin1().data()) == 0;
-
-    PyGILState_Release(gstate);
-    return rc;
-}
-
-PyObject *ImportModule (QString moduleName)
-{
-    if (moduleName.isEmpty())
-    {
-        return 0;
-    }
-
-    PyGILState_STATE gstate;
-    gstate = PyGILState_Ensure();
-
-    PyObject *module = PyImport_ImportModule (moduleName.toLatin1().data());
-
-    PyGILState_Release(gstate);
-    return module;
-}
-
-// Reload libpython, but this time tell the runtime linker to make the
-// symbols global and available for later loaded libraries/module.
-QLibrary *LoadPythonLibrary()
-{
-    QLibrary *pythonLib = new QLibrary();
-    pythonLib->setLoadHints(QLibrary::ExportExternalSymbolsHint);
-    pythonLib->setFileName(LIB_PYTHON ".1");
-    pythonLib->load();
-    return pythonLib;
-}
-
-PyObject *RunFunction(PyObject *object, PyObject *args)
-{
-    PyGILState_STATE gstate;
-    gstate = PyGILState_Ensure();
-
-    if (!PyCallable_Check (object))
-    {
-        PyGILState_Release(gstate);
-        return NULL;
-    }
-
-    PyObject *res = PyObject_CallObject (object, args ? args : PyTuple_New (0));
-    PyGILState_Release(gstate);
-    Py_XINCREF (res);
-    return res;
-}
-
-extern "C"
-{
-/*
-The main function initializes the Python interpreter, if not already
-running, imports the Python module containing the kioslave class to
-use, and calls the kdemain() function in module with the pool and app
-parameters. The Python kdemain code will typically do this:
-
-    def kdemain(pool, app):
-        slave = SlaveClass(pool, app)
-        slave.dispatchLoop()
-*/
-int kdemain( int argc, char **argv )
-{
-    Q_UNUSED(argc);
-    PyObject *pModule;
-    char *protocol = argv[1];
-
-#ifdef PY3
-    /* Python 3 requires wchar_t*s for its Py_SetProgramName() and
-       PySys_SetArgv() calls.  Python 2 uses the typical char*s.  This is
-       probably not the best way to do it, but the algorithm is based on
-       Python 3's main().
-    */
-    wchar_t **program_args = (wchar_t **)PyMem_Malloc(
-        sizeof(wchar_t *) * (argc + 1));
-    char *old_locale;
-    const char *argv_i;
-
-    if (!program_args) {
-        /* out of memory */
-        Py_FatalError("out of memory");
-    }
-    for (int i = 0; i < argc; i++) {
-        program_args[i] = (wchar_t *)PyMem_Malloc(
-            sizeof(wchar_t) * (strlen(argv[i]) + 1));
-        if (!program_args[i]) {
-            Py_FatalError("out of memory");
-        }
-        argv_i = argv[i];
-        if (mbsrtowcs(program_args[i], &argv_i, strlen(argv[i]), NULL) < 0) {
-            /* The conversion failed. */
-            Py_FatalError("conversion to wchar_t* failed");
-        }
-    }
-#else
-    char **program_args = argv;
-#endif  // PY3
-
-    kDebug() << "Python kioslave starting";
-    KComponentData slave(protocol);
-    kDebug() << "Created KComponentData for protocol " << protocol;
-
-    QLibrary *pyLib = LoadPythonLibrary();
-
-    Py_SetProgramName(program_args[0]);
-    Py_Initialize();
-
-    //PyEval_InitThreads();
-    PySys_SetArgv(1, program_args);
-
-    QString completePath = KStandardDirs::locate("data", QString("kio_python/%1/%2.py").arg(protocol).arg(protocol));
-    kDebug() << "Path to Python kioslace is " << completePath;
-    QFileInfo pathInfo(completePath);
-    QString path = pathInfo.absoluteDir().absolutePath();
-
-    // Set up the Python module path.
-    if(!AppendToSysPath(path.toLatin1().data()))
-    {
-        kError() << "Failed to set sys.path to " << path;
-        return 1;
-    }
-
-    pModule = ImportModule(QString(protocol));
-    if (pModule == NULL)
-    {
-        kError() << "Python kioslace module is NULL.";
-        PyErr_Print();
-        return 1;
-    }
-
-    // Get the Python module's kdemain function and call it.
-    PyObject *factoryFunction = PyObject_GetAttrString(pModule, "kdemain");
-    if(!factoryFunction)
-    {
-        kError() << "Failed to find factory function";
-        return 1;
-    }
-    PyObject *pClass, *pArgs, *pArg1, *pArg2;
-    pArgs = PyTuple_New(2);
-    pArg1 = PyBytes_FromString(argv[2]);
-    pArg2 = PyBytes_FromString(argv[3]);
-    PyTuple_SetItem(pArgs, 0, pArg1);
-    PyTuple_SetItem(pArgs, 1, pArg2);
-    RunFunction(factoryFunction, pArgs);
-
-    Py_XDECREF(pClass);
-    Py_XDECREF(pArgs);
-    Py_XDECREF(pModule);
-
-    Py_Finalize();
-    return 0;
-}
-}
diff -pruN 4:4.14.0-1/.pc/kubuntu_include_dirs.diff/CMakeLists.txt 4:4.14.2-0ubuntu9/.pc/kubuntu_include_dirs.diff/CMakeLists.txt
--- 4:4.14.0-1/.pc/kubuntu_include_dirs.diff/CMakeLists.txt	1970-01-01 00:00:00.000000000 +0000
+++ 4:4.14.2-0ubuntu9/.pc/kubuntu_include_dirs.diff/CMakeLists.txt	2017-11-22 07:27:37.000000000 +0000
@@ -0,0 +1,285 @@
+project(pykde4)
+
+cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+
+# search packages used by KDE
+find_package(KDE4 4.9.4 REQUIRED)
+
+# Match what's used in the main macros
+cmake_policy(SET CMP0002 OLD)
+find_package(PythonLibrary)
+
+include(KDE4Defaults)
+include(MacroLibrary)
+include(PythonMacros)
+include(FeatureSummary)
+find_package(PkgConfig REQUIRED)
+# this doesn't work ...
+pkg_check_modules(PYTHON xpython${_CURRENT_VERSION})
+
+option(PYKDEUIC4_ALTINSTALL "Enable parallel-installation of the PyKDE4 tools" FALSE)
+
+set(CMAKE_MODULE_PATH ${pykde4_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
+
+find_package(PythonLibrary)
+
+set_package_properties(KDE4 PROPERTIES DESCRIPTION "The KDE libraries"
+                       URL "http://www.kde.org" TYPE REQUIRED
+                       PURPOSE "Required to build PyKDE4")
+set_package_properties(PythonLibrary PROPERTIES DESCRIPTION
+                       "The Python Library" URL "http://www.python.org"
+                       TYPE REQUIRED PURPOSE "Required to build PyKDE4")
+set_package_properties(PythonInterp PROPERTIES
+                       DESCRIPTION "The Python interpreter"
+                       URL "http://www.python.org" TYPE REQUIRED
+                       PURPOSE "Required to build PyKDE4")
+
+include_directories(${KDE4_INCLUDES})
+
+add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DQT3_SUPPORT)
+
+find_package(SIP)
+set_package_properties(SIP PROPERTIES DESCRIPTION "The SIP binding generator"
+                       URL "http://riverbankcomputing.com" TYPE REQUIRED
+                       PURPOSE "Required to build PyKDE4")
+
+include(SIPMacros)
+
+if(SIP_VERSION STRLESS "040e00")    # These version numbers also appear in ../CMakeLists.txt
+    message(FATAL_ERROR "The version of SIP found is too old. 4.14 or later is needed.")
+endif()
+
+find_package(PyQt4)
+set_package_properties(PyQt4 PROPERTIES DESCRIPTION "The PyQt bindings"
+                       URL "http://riverbankcomputing.com" TYPE REQUIRED
+                       PURPOSE "Required to build PyKDE4")
+
+if(PYQT4_VERSION STRLESS "040905")  # These version numbers also appear in ../CMakeLists.txt
+    message(FATAL_ERROR "The version of PyQt found is too old. 4.9 or later is required.")
+endif()
+
+macro_optional_find_package(Soprano)
+set_package_properties(Soprano PROPERTIES DESCRIPTION "The Soprano libraries"
+                       URL "http://projects.kde.org/kdesupport/soprano"
+                       TYPE OPTIONAL PURPOSE
+                       "Required for Soprano Python bindings")
+
+macro_optional_find_package(Nepomuk)
+set_package_properties(Nepomuk PROPERTIES DESCRIPTION "The Nepomuk libraries"
+                       URL "http://projects.kde.org/kde/kdelibs/" TYPE OPTIONAL
+                       PURPOSE "Required for Nepomuk Python bindings")
+
+macro_optional_find_package(KdepimLibs)
+set_package_properties(KdepimLibs PROPERTIES DESCRIPTION "The KDE PIM libraries"
+                       URL "http://projects.kde.org/kde/kdepimlibs" TYPE OPTIONAL
+                       PURPOSE "Required for the Akonadi Python bindings")
+
+macro_optional_find_package(PolkitQt)
+set_package_properties(PolkitQt PROPERTIES DESCRIPTION "Qt wrapper around Polkit"
+                       TYPE OPTIONAL PURPOSE
+                       "Required to build Python Polkit bindings")
+
+include_directories(
+    ${PYTHON_INCLUDE_PATH}
+    ${SIP_INCLUDE_DIR}
+    ${QT_INCLUDE_DIR}
+    ${QT_QT_INCLUDE_DIR}
+    ${QT_QTCORE_INCLUDE_DIR}
+    ${QT_QTDESIGNER_INCLUDE_DIR}
+    ${QT_QTGUI_INCLUDE_DIR}
+    ${QT_QTNETWORK_INCLUDE_DIR}
+    ${QT_QTOPENGL_INCLUDE_DIR}
+    ${QT_QTSQL_INCLUDE_DIR}
+    ${QT_QTXML_INCLUDE_DIR}
+    ${QT_QTSVG_INCLUDE_DIR}
+    ${QT_QTWEBKIT_INCLUDE_DIR}
+    ${KDE4_INCLUDE_DIR}
+    ${KDE4_INCLUDE_DIR}/solid
+    ${KDE4_INCLUDE_DIR}/kio
+    ${KDE4_INCLUDE_DIR}/dom
+    ${KDE4_INCLUDE_DIR}/ksettings
+    ${KDE4_INCLUDE_DIR}/knewstuff2
+    ${KDE4_INCLUDE_DIR}/dnssd
+    ${KDE4_PHONON_INCLUDES}
+    ${KDEPIMLIBS_INCLUDE_DIRS}
+)
+
+# Pull in ARM configuration options if needed
+STRING(REGEX MATCH "PyQt_qreal_double" SIP_ARM_HACK ${PYQT4_SIP_FLAGS} "")
+
+set(SIP_INCLUDES ${CMAKE_BINARY_DIR} ${PYQT4_SIP_DIR} sip)
+set(SIP_CONCAT_PARTS 8)
+if (WIN32)
+    set(SIP_TAGS ALL WS_WIN ${PYQT4_VERSION_TAG})
+else ()
+    set(SIP_TAGS ALL WS_X11 ${PYQT4_VERSION_TAG})
+endif ()
+set(SIP_DISABLE_FEATURES VendorID PyQt_NoPrintRangeBug ${SIP_ARM_HACK})
+
+set(SIP_FILES_INSTALL_DIR ${SHARE_INSTALL_PREFIX}/sip)
+
+# Use an extra option when compiling on Python 3.
+if (PYTHON_VERSION_MAJOR GREATER 2)
+    if(PYQT4_VERSION STRGREATER "040904")
+	    # Disable for features in newer Qt
+        if (PYQT4_VERSION STRGREATER "040a04")
+            # GLuint + QVector (PyQt > 4.11)
+            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector -x PyKDE_GLuint)
+        else ()
+            # QVector (PyQt < 4.11)
+            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector)
+        endif ()
+    else ()
+	    set(SIP_EXTRA_OPTIONS -g)
+    endif()
+else (PYTHON_VERSION_MAJOR GREATER 2)
+    if(PYQT4_VERSION STRGREATER "040904")
+	# Disable for newer PyQt
+        if (PYQT4_VERSION STRGREATER "040a04")
+            # GLuint + QVector (PyQt > 4.11)
+            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector -x Py_v3 -x PyKDE_GLuint)
+        else ()
+            # QVector (PyQt < 4.11)
+            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector -x Py_v3)
+        endif ()
+    else ()
+	    set(SIP_EXTRA_OPTIONS -g -x Py_v3)
+    endif()
+endif ()
+
+add_definitions(-D_REENTRANT -DQT_CORE_LIB -DQT_GUI_LIB -DUSING_SOPRANO_NRLMODEL_UNSTABLE_API -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public)
+
+include(PyKDEConfigurationInformation.cmake)
+
+# Only install pykdeconfig.py if PyQt itself has installed pyqtconfig.py, since
+# its absence indicates PyQt was built with the new build system and
+# pykdeconfig will not work.
+execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import PyQt4.pyqtconfig"
+                RESULT_VARIABLE _exit_code OUTPUT_QUIET ERROR_QUIET)
+if (NOT _exit_code)
+    python_install(${CMAKE_CURRENT_BINARY_DIR}/pykdeconfig.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKDE4)
+endif ()
+
+# Do not use --no-undefined for python modules.
+STRING(REPLACE -Wl,--no-undefined "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+
+file(GLOB kdecore_files_sip sip/kdecore/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${kdecore_files_sip})
+add_sip_python_module(PyKDE4.kdecore sip/kdecore/kdecoremod.sip ${KDE4_KDECORE_LIBS} ${KDE4_KPTY_LIBS} ${QT_QTNETWORK_LIBRARY})
+
+file(GLOB solid_files_sip sip/solid/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${solid_files_sip})
+add_sip_python_module(PyKDE4.solid sip/solid/solidmod.sip ${KDE4_SOLID_LIBS} ${QT_QTCORE_LIBRARY})
+
+file(GLOB kdeui_files_sip sip/kdeui/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${kdeui_files_sip})
+add_sip_python_module(PyKDE4.kdeui sip/kdeui/kdeuimod.sip ${KDE4_KDEUI_LIBS} ${QT_QTXML_LIBRARY})
+
+file(GLOB kio_files_sip sip/kio/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${kio_files_sip})
+add_sip_python_module(PyKDE4.kio sip/kio/kiomod.sip ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS})
+
+file(GLOB kutils_files_sip sip/kutils/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${kutils_files_sip})
+add_sip_python_module(PyKDE4.kutils sip/kutils/kutilsmod.sip ${KDE4_KUTILS_LIBS} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${KDE4_KDEUI_LIBS})
+
+file(GLOB kparts_files_sip sip/kparts/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${kparts_files_sip})
+add_sip_python_module(PyKDE4.kparts sip/kparts/kpartsmod.sip ${KDE4_KPARTS_LIBS})
+
+file(GLOB ktexteditor_files_sip sip/ktexteditor/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${ktexteditor_files_sip})
+add_sip_python_module(PyKDE4.ktexteditor sip/ktexteditor/ktexteditormod.sip ${KDE4_KTEXTEDITOR_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+
+file(GLOB khtml_files_sip sip/khtml/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${khtml_files_sip})
+add_sip_python_module(PyKDE4.khtml sip/khtml/khtmlmod.sip ${KDE4_KHTML_LIBS})
+
+file(GLOB knewstuff_files_sip sip/knewstuff/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${knewstuff_files_sip})
+add_sip_python_module(PyKDE4.knewstuff sip/knewstuff/knewstuffmod.sip ${KDE4_KNEWSTUFF2_LIBS} ${KDE4_KNEWSTUFF3_LIBS} ${QT_QTCORE_LIBRARY})
+
+file(GLOB dnssd_files_sip sip/dnssd/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${dnssd_files_sip})
+add_sip_python_module(PyKDE4.dnssd sip/dnssd/dnssdmod.sip ${KDE4_KDNSSD_LIBS} ${QT_QTCORE_LIBRARY})
+
+file(GLOB phonon_files_sip sip/phonon/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${phonon_files_sip})
+add_sip_python_module(PyKDE4.phonon sip/phonon/phononmod.sip ${PHONON_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+
+file(GLOB plasma_files_sip sip/plasma/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${plasma_files_sip})
+add_sip_python_module(PyKDE4.plasma sip/plasma/plasmamod.sip ${KDE4_PLASMA_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTUITOOLS_LIBRARY} ${KDE4_KIO_LIBRARY} ${KDE4_KDECORE_LIBRARY} ${KDE4_KDEUI_LIBRARY})
+
+file(GLOB kterminal_files_sip sip/kterminal/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${kterminal_files_sip})
+add_sip_python_module(PyKDE4.kterminal sip/kterminal/kterminalmod.sip ${KDE4_TERMINAL_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+
+set(PYKDE_MODULES "kdecore solid kdeui kio kutils kparts ktexteditor dnssd phonon plasma kterminal")
+
+if(Soprano_FOUND)
+    include_directories(${SOPRANO_INCLUDE_DIR})
+    file(GLOB soprano_files_sip sip/soprano/*.sip)
+    set(SIP_EXTRA_FILES_DEPEND ${soprano_files_sip})
+    add_sip_python_module(PyKDE4.soprano sip/soprano/sopranomod.sip ${SOPRANO_LIBRARIES} ${SOPRANO_CLIENT_LIBRARIES} ${SOPRANO_SERVER_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY})
+    set(PYKDE_MODULES "${PYKDE_MODULES} soprano")
+endif()
+
+if(Nepomuk_FOUND)
+    include_directories(${NEPOMUK_INCLUDE_DIR})
+    file(GLOB nepomuk_files_sip sip/nepomuk/*.sip)
+    set(SIP_EXTRA_FILES_DEPEND ${nepomuk_files_sip})
+    add_sip_python_module(PyKDE4.nepomuk sip/nepomuk/nepomukmod.sip ${NEPOMUK_LIBRARIES} ${NEPOMUK_QUERY_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${SOPRANO_LIBRARIES} ${KDE4_KIO_LIBS})
+    set(PYKDE_MODULES "${PYKDE_MODULES} nepomuk")
+endif()
+
+if(KdepimLibs_FOUND)
+    find_package(Boost 1.34.0)
+    set_package_properties(Boost PROPERTIES DESCRIPTION "Boost C++ Libraries"
+                           URL "http://www.boost.org" TYPE REQUIRED
+                           PURPOSE "Boost is required by Akonadi")
+    include_directories(${KDEPIMLIBS_INCLUDE_DIRS})
+    file(GLOB akonadi_files_sip sip/akonadi/*.sip)
+    set(SIP_EXTRA_FILES_DEPEND ${akonadi_files_sip})
+    add_sip_python_module(PyKDE4.akonadi sip/akonadi/akonadimod.sip ${KDE4_AKONADI_LIBS} ${KDE4_AKONADI_KMIME_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS})
+    set(PYKDE_MODULES "${PYKDE_MODULES} akonadi")
+endif()
+
+if(POLKITQT_FOUND)
+    include_directories(${POLKITQT_INCLUDE_DIR})
+
+    file(GLOB pollkitqt_files_sip sip/polkitqt/*.sip)
+
+    # ${POLKITQT_INCLUDE_DIR} -- We don't use this directly, because we need the #includes
+    # in the .sip file to be more specific otherwise they pick up the wrong action.h etc.
+
+    set(SIP_EXTRA_FILES_DEPEND ${pollkitqt_files_sip})
+    add_sip_python_module(PyKDE4.polkitqt sip/polkitqt/polkitqtmod.sip ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${POLKITQT_LIBRARIES})
+    set(PYKDE_MODULES "${PYKDE_MODULES} polkitqt")
+endif()
+
+python_install(__init__.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKDE4)
+
+# Install the .sip files for anyone that wants to build bindings on top of PyKDE4.
+# (Don't forget the / at the end of sip/.)
+install(FILES ${CMAKE_BINARY_DIR}/pykde_config.sip DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4/)
+if(DEFAULT_PYTHON_VERSION)
+  install(DIRECTORY sip/ DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4
+        PATTERN "*~" EXCLUDE    # This sucks, why can't I just whitelist what I _do_ want?
+        PATTERN ".svn" EXCLUDE
+        PATTERN "*.in" EXCLUDE)
+   message("Installing sip files in this build pass")
+else(DEFAULT_PYTHON_VERSION)
+   message("Not installing sip files in this build pass")
+endif(DEFAULT_PYTHON_VERSION)
+
+add_subdirectory(tools)
+#add_subdirectory(docs)
+add_subdirectory(examples)
+# Due to version specific ABI tagging in Python 3 so files, we can build for
+# all Python 3 versions without a problem.
+if ((PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION) OR PYTHON_VERSION_MAJOR GREATER 2)
+    add_subdirectory(kpythonpluginfactory)
+endif ((PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION) OR PYTHON_VERSION_MAJOR GREATER 2)
+
+feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff -pruN 4:4.14.0-1/.pc/kubuntu_kpythonpluginfactory_3.2support.diff/kpythonpluginfactory/kpythonpluginfactory.cpp 4:4.14.2-0ubuntu9/.pc/kubuntu_kpythonpluginfactory_3.2support.diff/kpythonpluginfactory/kpythonpluginfactory.cpp
--- 4:4.14.0-1/.pc/kubuntu_kpythonpluginfactory_3.2support.diff/kpythonpluginfactory/kpythonpluginfactory.cpp	1970-01-01 00:00:00.000000000 +0000
+++ 4:4.14.2-0ubuntu9/.pc/kubuntu_kpythonpluginfactory_3.2support.diff/kpythonpluginfactory/kpythonpluginfactory.cpp	2017-11-22 07:27:37.000000000 +0000
@@ -0,0 +1,439 @@
+/* Copyright 2003 Jim Bublitz <jbublitz@nwinternet.com>
+   Copyright 2008 Simon Edwards <simon@simonzone.com>
+   Copyright 2008 David Boddie <david@boddie.org.uk>
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public License
+   along with this library; see the file COPYING.LIB.  If not, write to
+   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.
+*/
+
+#include <Python.h>
+#include <QtCore/QCoreApplication>
+#include <QFileInfo>
+#include <QDir>
+#include <QSet>
+#include <klibloader.h>
+#include <kstandarddirs.h>
+#include <kcmodule.h>
+#include <kcomponentdata.h>
+#include <kdebug.h>
+
+#if PY_MAJOR_VERSION >= 3
+#define PY3
+#endif
+
+/*
+This implements a plugin factory for running Python plugins. It also
+supports io-slaves with a kdemain() entry point.
+*/
+
+class KPythonPluginFactory : public KPluginFactory
+{
+    public:
+        KPythonPluginFactory(const char *name=0);
+        ~KPythonPluginFactory();
+
+        static PyThreadState *threadState;
+
+    protected:
+        virtual QObject *create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword);
+    private:
+        void initialize();
+        QLibrary *pythonLib;
+        static QSet<QString> loadedKeywords;
+};
+QSet<QString> KPythonPluginFactory::loadedKeywords;
+PyThreadState *KPythonPluginFactory::threadState = 0;
+
+K_EXPORT_PLUGIN(KPythonPluginFactory("kpythonpluginfactory"))
+K_GLOBAL_STATIC(KComponentData, KPythonPluginFactory_factorycomponentdata)
+
+bool AppendToSysPath (QString newPath);
+PyObject *ImportModule (QString moduleName);
+QLibrary *LoadPythonLibrary();
+PyObject *RunFunction(PyObject *object, PyObject *args);
+
+// This cleanup function is run just before program unload but before
+// any static data is destroyed. It makes sure that the interpreter
+// is shutdown before the PyQt shared libraries etc are unloaded.
+static void KPythonPluginFactoryCleanup_PostRoutine()
+{
+    PyThreadState *tstate = PyThreadState_GET();
+    if (!tstate)
+    {
+        // Ensure that thread state is not null.
+        PyThreadState_Swap(KPythonPluginFactory::threadState);
+    }
+    if (Py_IsInitialized())
+    {
+        Py_Finalize();
+    }
+}
+
+KPythonPluginFactory::KPythonPluginFactory(const char *name) : KPluginFactory(name)
+{
+    pythonLib = 0;
+
+    kDebug() << "KPythonPluginFactory::KPythonPluginFactory()";
+
+    qAddPostRoutine(KPythonPluginFactoryCleanup_PostRoutine);
+
+    if (KPythonPluginFactory_factorycomponentdata->isValid())
+    {
+        setComponentData(*KPythonPluginFactory_factorycomponentdata); \
+    }
+    else
+    {
+        *KPythonPluginFactory_factorycomponentdata = KPluginFactory::componentData();
+    }
+}
+
+void KPythonPluginFactory::initialize()
+{
+   if (!Py_IsInitialized ())
+   {
+        kDebug() << "Initializing Python interpreter.";
+        pythonLib = LoadPythonLibrary();
+
+        PyEval_InitThreads ();
+        Py_Initialize ();
+        if (!Py_IsInitialized ())
+        {
+            //pythonInit = 0;
+            return;
+        }
+
+        kDebug() << "Succesfully initialized Python interpreter.";
+
+        threadState = PyThreadState_GET();
+        // free the lock
+        PyEval_ReleaseLock();
+    }
+}
+
+QObject *KPythonPluginFactory::create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword)
+{
+    initialize();
+
+    kDebug() << "KPythonPluginFactory::create iface: " << iface;
+    kDebug() << "keyword to be used for finding the plugin code: " << keyword;
+    QString completePath = KStandardDirs::locate("data", keyword);
+    kDebug() << "Path to plugin code is: " << completePath;
+
+    if (completePath.isEmpty())
+    {
+        kError() << "Unable to find plugin code: " << keyword;
+        return 0;
+    }
+
+    QFileInfo pathInfo(completePath);
+    QString path = pathInfo.absoluteDir().absolutePath();
+    QString scriptName = pathInfo.baseName();
+
+    bool loaded = loadedKeywords.contains(keyword);
+
+    // Set up the Python module path.
+    if (!loaded)
+    {
+        if(!AppendToSysPath(path.toLatin1().data()))
+        {
+            kError() << "Failed to set sys.path to " << path;
+            return 0;
+        }
+    }
+
+    // Load the Python script.
+    PyObject *pyModule = ImportModule(scriptName);
+    if(!pyModule)
+    {
+        kError() << "Failed to import module";
+        PyErr_Print();
+        return 0;
+    }
+
+
+    PyGILState_STATE gstate;
+    gstate = PyGILState_Ensure();
+
+    if (!loaded) {
+        // Inject a helper function
+        QString bridge = QString("def kpythonpluginfactory_bridge(parentWidget,parent,componentData):\n"
+                                "    import sip\n"
+                                "    from PyQt4 import QtCore\n"
+                                "    from PyQt4 import QtGui\n"
+                                "    from PyKDE4 import kdecore\n"
+                                "    if parentWidget!=0:\n"
+                                "        wparentWidget = sip.wrapinstance(parent,QtGui.QWidget)\n"
+                                "    else:\n"
+                                "        wparentWidget = None\n"
+                                "    if parent!=0:\n"
+                                "        wparent = sip.wrapinstance(parent,QtCore.QObject)\n"
+                                "    else:\n"
+                                "        wparent = None\n"
+                                "    if componentData!=0:\n"
+                                "        wcomponentData = sip.wrapinstance(componentData,kdecore.KComponentData)\n"
+                                "    else:\n"
+                                "        wcomponentData = None\n"
+                                "    inst = CreatePlugin(wparentWidget,wparent,wcomponentData)\n"
+                                "    return (inst,sip.unwrapinstance(inst))\n");
+        PyRun_String(bridge.toLatin1().data(), Py_file_input, PyModule_GetDict(pyModule), PyModule_GetDict(pyModule));
+    }
+
+    // Get the Python module's factory function.
+    PyObject *factoryFunction = PyObject_GetAttrString(pyModule, "kpythonpluginfactory_bridge");
+    if(!factoryFunction)
+    {
+        kDebug() << "Failed to find factory function";
+        PyGILState_Release(gstate);
+        return 0;
+    }
+
+    if (!loaded)
+    {
+        registerPlugin<KCModule>(keyword,0);//,&QObject::staticMetaObject,0);
+    }
+
+    loadedKeywords << keyword;
+
+    // Call the factory function. Set up the args.
+    PyObject *pyParentWidget = PyLong_FromVoidPtr(parentWidget);
+    PyObject *pyParent = PyLong_FromVoidPtr(parent);
+    PyObject *pyComponentData = PyLong_FromVoidPtr(KPythonPluginFactory_factorycomponentdata);
+
+    // Using NNN here is effect gives our references to the arguement away.
+    PyObject *functionArgs = Py_BuildValue ("NNN", pyParentWidget, pyParent, pyComponentData);
+    PyObject *pyResultTuple = 0;
+    if(pyParentWidget && pyParent && functionArgs)
+    {
+        // run the factory function
+        pyResultTuple = RunFunction(factoryFunction, functionArgs);
+        if(!pyResultTuple)
+        {
+            kError() << "Error while running factory function for Python plugin: " << keyword;
+            PyErr_Print();
+            PyGILState_Release(gstate);
+            return 0;
+        }
+    }
+    else
+    {
+        kError() << "Failed to create args.";
+        PyGILState_Release(gstate);
+        return 0;
+    }
+    // cleanup a bit
+    Py_XDECREF(functionArgs);
+    Py_XDECREF(factoryFunction);
+
+    // Stop this from getting garbage collected.
+    Py_INCREF(PyTuple_GET_ITEM(pyResultTuple,0));
+
+    // convert the KCModule PyObject to a real C++ KCModule *.
+    PyObject *pyQObject;
+    pyQObject = PyTuple_GET_ITEM(pyResultTuple,1);
+    QObject *resultQObject = (QObject *)PyLong_AsVoidPtr(pyQObject);
+    if(!resultQObject)
+    {
+        kError() << "Failed sip conversion to C++ pointer";
+        PyGILState_Release(gstate);
+        return 0;
+    }
+    Py_XDECREF(pyResultTuple);
+
+    // take care of any translation info
+//    KGlobal::locale()->insertCatalogue(script);
+    kDebug() << "Returning result qobject";
+    PyGILState_Release(gstate);
+    return resultQObject;
+}
+
+KPythonPluginFactory::~KPythonPluginFactory()
+{
+    kDebug() << "KPythonPluginFactory::~KPythonPluginFactory()";
+    if (Py_IsInitialized())
+    {
+        Py_Finalize();
+    }
+    if (pythonLib)
+    {
+        delete pythonLib;
+    }
+}
+
+bool AppendToSysPath (QString newPath)
+{
+    if (newPath.isEmpty())
+    {
+        return false;
+    }
+
+    PyGILState_STATE gstate;
+    gstate = PyGILState_Ensure();
+
+    QString line = QString("import sys\nif not '%1' in sys.path:\n\tsys.path.append ('%2')\n")
+                           .arg(newPath).arg(newPath);
+    bool rc = PyRun_SimpleString (line.toLatin1().data()) == 0;
+
+    PyGILState_Release(gstate);
+    return rc;
+}
+
+PyObject *ImportModule (QString moduleName)
+{
+    if (moduleName.isEmpty())
+    {
+        return 0;
+    }
+
+    PyGILState_STATE gstate;
+    gstate = PyGILState_Ensure();
+
+    PyObject *module = PyImport_ImportModule (moduleName.toLatin1().data());
+
+    PyGILState_Release(gstate);
+    return module;
+}
+
+// Reload libpython, but this time tell the runtime linker to make the
+// symbols global and available for later loaded libraries/module.
+QLibrary *LoadPythonLibrary()
+{
+    QLibrary *pythonLib = new QLibrary();
+    pythonLib->setLoadHints(QLibrary::ExportExternalSymbolsHint);
+    pythonLib->setFileName(LIB_PYTHON ".1");
+    pythonLib->load();
+    return pythonLib;
+}
+
+PyObject *RunFunction(PyObject *object, PyObject *args)
+{
+    PyGILState_STATE gstate;
+    gstate = PyGILState_Ensure();
+
+    if (!PyCallable_Check (object))
+    {
+        PyGILState_Release(gstate);
+        return NULL;
+    }
+
+    PyObject *res = PyObject_CallObject (object, args ? args : PyTuple_New (0));
+    PyGILState_Release(gstate);
+    Py_XINCREF (res);
+    return res;
+}
+
+extern "C"
+{
+/*
+The main function initializes the Python interpreter, if not already
+running, imports the Python module containing the kioslave class to
+use, and calls the kdemain() function in module with the pool and app
+parameters. The Python kdemain code will typically do this:
+
+    def kdemain(pool, app):
+        slave = SlaveClass(pool, app)
+        slave.dispatchLoop()
+*/
+int kdemain( int argc, char **argv )
+{
+    Q_UNUSED(argc);
+    PyObject *pModule;
+    char *protocol = argv[1];
+
+#ifdef PY3
+    /* Python 3 requires wchar_t*s for its Py_SetProgramName() and
+       PySys_SetArgv() calls.  Python 2 uses the typical char*s.  This is
+       probably not the best way to do it, but the algorithm is based on
+       Python 3's main().
+    */
+    wchar_t **program_args = (wchar_t **)PyMem_Malloc(
+        sizeof(wchar_t *) * (argc + 1));
+    char *old_locale;
+    const char *argv_i;
+
+    if (!program_args) {
+        /* out of memory */
+        Py_FatalError("out of memory");
+    }
+    for (int i = 0; i < argc; i++) {
+        program_args[i] = (wchar_t *)PyMem_Malloc(
+            sizeof(wchar_t) * (strlen(argv[i]) + 1));
+        if (!program_args[i]) {
+            Py_FatalError("out of memory");
+        }
+        argv_i = argv[i];
+        if (mbsrtowcs(program_args[i], &argv_i, strlen(argv[i]), NULL) < 0) {
+            /* The conversion failed. */
+            Py_FatalError("conversion to wchar_t* failed");
+        }
+    }
+#else
+    char **program_args = argv;
+#endif  // PY3
+
+    kDebug() << "Python kioslave starting";
+    KComponentData slave(protocol);
+    kDebug() << "Created KComponentData for protocol " << protocol;
+
+    QLibrary *pyLib = LoadPythonLibrary();
+
+    Py_SetProgramName(program_args[0]);
+    Py_Initialize();
+
+    //PyEval_InitThreads();
+    PySys_SetArgv(1, program_args);
+
+    QString completePath = KStandardDirs::locate("data", QString("kio_python/%1/%2.py").arg(protocol).arg(protocol));
+    kDebug() << "Path to Python kioslace is " << completePath;
+    QFileInfo pathInfo(completePath);
+    QString path = pathInfo.absoluteDir().absolutePath();
+
+    // Set up the Python module path.
+    if(!AppendToSysPath(path.toLatin1().data()))
+    {
+        kError() << "Failed to set sys.path to " << path;
+        return 1;
+    }
+
+    pModule = ImportModule(QString(protocol));
+    if (pModule == NULL)
+    {
+        kError() << "Python kioslace module is NULL.";
+        PyErr_Print();
+        return 1;
+    }
+
+    // Get the Python module's kdemain function and call it.
+    PyObject *factoryFunction = PyObject_GetAttrString(pModule, "kdemain");
+    if(!factoryFunction)
+    {
+        kError() << "Failed to find factory function";
+        return 1;
+    }
+    PyObject *pClass, *pArgs, *pArg1, *pArg2;
+    pArgs = PyTuple_New(2);
+    pArg1 = PyBytes_FromString(argv[2]);
+    pArg2 = PyBytes_FromString(argv[3]);
+    PyTuple_SetItem(pArgs, 0, pArg1);
+    PyTuple_SetItem(pArgs, 1, pArg2);
+    RunFunction(factoryFunction, pArgs);
+
+    Py_XDECREF(pClass);
+    Py_XDECREF(pArgs);
+    Py_XDECREF(pModule);
+
+    Py_Finalize();
+    return 0;
+}
+}
diff -pruN 4:4.14.0-1/.pc/new_pyincludes.diff/CMakeLists.txt 4:4.14.2-0ubuntu9/.pc/new_pyincludes.diff/CMakeLists.txt
--- 4:4.14.0-1/.pc/new_pyincludes.diff/CMakeLists.txt	2017-11-22 07:27:36.000000000 +0000
+++ 4:4.14.2-0ubuntu9/.pc/new_pyincludes.diff/CMakeLists.txt	1970-01-01 00:00:00.000000000 +0000
@@ -1,280 +0,0 @@
-project(pykde4)
-
-cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
-
-# search packages used by KDE
-find_package(KDE4 4.9.4 REQUIRED)
-
-# Match what's used in the main macros
-cmake_policy(SET CMP0002 OLD)
-find_package(PythonLibrary)
-
-include(KDE4Defaults)
-include(MacroLibrary)
-include(PythonMacros)
-include(FeatureSummary)
-
-option(PYKDEUIC4_ALTINSTALL "Enable parallel-installation of the PyKDE4 tools" FALSE)
-
-set(CMAKE_MODULE_PATH ${pykde4_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
-
-find_package(PythonLibrary)
-
-set_package_properties(KDE4 PROPERTIES DESCRIPTION "The KDE libraries"
-                       URL "http://www.kde.org" TYPE REQUIRED
-                       PURPOSE "Required to build PyKDE4")
-set_package_properties(PythonLibrary PROPERTIES DESCRIPTION
-                       "The Python Library" URL "http://www.python.org"
-                       TYPE REQUIRED PURPOSE "Required to build PyKDE4")
-set_package_properties(PythonInterp PROPERTIES
-                       DESCRIPTION "The Python interpreter"
-                       URL "http://www.python.org" TYPE REQUIRED
-                       PURPOSE "Required to build PyKDE4")
-
-include_directories(${KDE4_INCLUDES})
-
-add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DQT3_SUPPORT)
-
-find_package(SIP)
-set_package_properties(SIP PROPERTIES DESCRIPTION "The SIP binding generator"
-                       URL "http://riverbankcomputing.com" TYPE REQUIRED
-                       PURPOSE "Required to build PyKDE4")
-
-include(SIPMacros)
-
-if(SIP_VERSION STRLESS "040e00")    # These version numbers also appear in ../CMakeLists.txt
-    message(FATAL_ERROR "The version of SIP found is too old. 4.14 or later is needed.")
-endif()
-
-find_package(PyQt4)
-set_package_properties(PyQt4 PROPERTIES DESCRIPTION "The PyQt bindings"
-                       URL "http://riverbankcomputing.com" TYPE REQUIRED
-                       PURPOSE "Required to build PyKDE4")
-
-if(PYQT4_VERSION STRLESS "040905")  # These version numbers also appear in ../CMakeLists.txt
-    message(FATAL_ERROR "The version of PyQt found is too old. 4.9 or later is required.")
-endif()
-
-macro_optional_find_package(Soprano)
-set_package_properties(Soprano PROPERTIES DESCRIPTION "The Soprano libraries"
-                       URL "http://projects.kde.org/kdesupport/soprano"
-                       TYPE OPTIONAL PURPOSE
-                       "Required for Soprano Python bindings")
-
-macro_optional_find_package(Nepomuk)
-set_package_properties(Nepomuk PROPERTIES DESCRIPTION "The Nepomuk libraries"
-                       URL "http://projects.kde.org/kde/kdelibs/" TYPE OPTIONAL
-                       PURPOSE "Required for Nepomuk Python bindings")
-
-macro_optional_find_package(KdepimLibs)
-set_package_properties(KdepimLibs PROPERTIES DESCRIPTION "The KDE PIM libraries"
-                       URL "http://projects.kde.org/kde/kdepimlibs" TYPE OPTIONAL
-                       PURPOSE "Required for the Akonadi Python bindings")
-
-macro_optional_find_package(PolkitQt)
-set_package_properties(PolkitQt PROPERTIES DESCRIPTION "Qt wrapper around Polkit"
-                       TYPE OPTIONAL PURPOSE
-                       "Required to build Python Polkit bindings")
-
-include_directories(
-    ${PYTHON_INCLUDE_PATH}
-    ${SIP_INCLUDE_DIR}
-    ${QT_INCLUDE_DIR}
-    ${QT_QT_INCLUDE_DIR}
-    ${QT_QTCORE_INCLUDE_DIR}
-    ${QT_QTDESIGNER_INCLUDE_DIR}
-    ${QT_QTGUI_INCLUDE_DIR}
-    ${QT_QTNETWORK_INCLUDE_DIR}
-    ${QT_QTOPENGL_INCLUDE_DIR}
-    ${QT_QTSQL_INCLUDE_DIR}
-    ${QT_QTXML_INCLUDE_DIR}
-    ${QT_QTSVG_INCLUDE_DIR}
-    ${QT_QTWEBKIT_INCLUDE_DIR}
-    ${KDE4_INCLUDE_DIR}
-    ${KDE4_INCLUDE_DIR}/solid
-    ${KDE4_INCLUDE_DIR}/kio
-    ${KDE4_INCLUDE_DIR}/dom
-    ${KDE4_INCLUDE_DIR}/ksettings
-    ${KDE4_INCLUDE_DIR}/knewstuff2
-    ${KDE4_INCLUDE_DIR}/dnssd
-    ${KDE4_PHONON_INCLUDES}
-    ${KDEPIMLIBS_INCLUDE_DIRS}
-)
-
-# Pull in ARM configuration options if needed
-STRING(REGEX MATCH "PyQt_qreal_double" SIP_ARM_HACK ${PYQT4_SIP_FLAGS} "")
-
-set(SIP_INCLUDES ${CMAKE_BINARY_DIR} ${PYQT4_SIP_DIR} sip)
-set(SIP_CONCAT_PARTS 8)
-if (WIN32)
-    set(SIP_TAGS ALL WS_WIN ${PYQT4_VERSION_TAG})
-else ()
-    set(SIP_TAGS ALL WS_X11 ${PYQT4_VERSION_TAG})
-endif ()
-set(SIP_DISABLE_FEATURES VendorID PyQt_NoPrintRangeBug ${SIP_ARM_HACK})
-
-set(SIP_FILES_INSTALL_DIR ${SHARE_INSTALL_PREFIX}/sip)
-
-# Use an extra option when compiling on Python 3.
-if (PYTHON_VERSION_MAJOR GREATER 2)
-    if(PYQT4_VERSION STRGREATER "040904")
-	    # Disable for features in newer Qt
-        if (PYQT4_VERSION STRGREATER "040a04")
-            # GLuint + QVector (PyQt > 4.11)
-            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector -x PyKDE_GLuint)
-        else ()
-            # QVector (PyQt < 4.11)
-            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector)
-        endif ()
-    else ()
-	    set(SIP_EXTRA_OPTIONS -g)
-    endif()
-else (PYTHON_VERSION_MAJOR GREATER 2)
-    if(PYQT4_VERSION STRGREATER "040904")
-	# Disable for newer PyQt
-        if (PYQT4_VERSION STRGREATER "040a04")
-            # GLuint + QVector (PyQt > 4.11)
-            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector -x Py_v3 -x PyKDE_GLuint)
-        else ()
-            # QVector (PyQt < 4.11)
-            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector -x Py_v3)
-        endif ()
-    else ()
-	    set(SIP_EXTRA_OPTIONS -g -x Py_v3)
-    endif()
-endif ()
-
-add_definitions(-D_REENTRANT -DQT_CORE_LIB -DQT_GUI_LIB -DUSING_SOPRANO_NRLMODEL_UNSTABLE_API -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public)
-
-include(PyKDEConfigurationInformation.cmake)
-
-# Only install pykdeconfig.py if PyQt itself has installed pyqtconfig.py, since
-# its absence indicates PyQt was built with the new build system and
-# pykdeconfig will not work.
-execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import PyQt4.pyqtconfig"
-                RESULT_VARIABLE _exit_code OUTPUT_QUIET ERROR_QUIET)
-if (NOT _exit_code)
-    python_install(${CMAKE_CURRENT_BINARY_DIR}/pykdeconfig.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKDE4)
-endif ()
-
-# Do not use --no-undefined for python modules.
-STRING(REPLACE -Wl,--no-undefined "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
-
-file(GLOB kdecore_files_sip sip/kdecore/*.sip)
-set(SIP_EXTRA_FILES_DEPEND ${kdecore_files_sip})
-add_sip_python_module(PyKDE4.kdecore sip/kdecore/kdecoremod.sip ${KDE4_KDECORE_LIBS} ${KDE4_KPTY_LIBS} ${QT_QTNETWORK_LIBRARY})
-
-file(GLOB solid_files_sip sip/solid/*.sip)
-set(SIP_EXTRA_FILES_DEPEND ${solid_files_sip})
-add_sip_python_module(PyKDE4.solid sip/solid/solidmod.sip ${KDE4_SOLID_LIBS} ${QT_QTCORE_LIBRARY})
-
-file(GLOB kdeui_files_sip sip/kdeui/*.sip)
-set(SIP_EXTRA_FILES_DEPEND ${kdeui_files_sip})
-add_sip_python_module(PyKDE4.kdeui sip/kdeui/kdeuimod.sip ${KDE4_KDEUI_LIBS} ${QT_QTXML_LIBRARY})
-
-file(GLOB kio_files_sip sip/kio/*.sip)
-set(SIP_EXTRA_FILES_DEPEND ${kio_files_sip})
-add_sip_python_module(PyKDE4.kio sip/kio/kiomod.sip ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS})
-
-file(GLOB kutils_files_sip sip/kutils/*.sip)
-set(SIP_EXTRA_FILES_DEPEND ${kutils_files_sip})
-add_sip_python_module(PyKDE4.kutils sip/kutils/kutilsmod.sip ${KDE4_KUTILS_LIBS} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${KDE4_KDEUI_LIBS})
-
-file(GLOB kparts_files_sip sip/kparts/*.sip)
-set(SIP_EXTRA_FILES_DEPEND ${kparts_files_sip})
-add_sip_python_module(PyKDE4.kparts sip/kparts/kpartsmod.sip ${KDE4_KPARTS_LIBS})
-
-file(GLOB ktexteditor_files_sip sip/ktexteditor/*.sip)
-set(SIP_EXTRA_FILES_DEPEND ${ktexteditor_files_sip})
-add_sip_python_module(PyKDE4.ktexteditor sip/ktexteditor/ktexteditormod.sip ${KDE4_KTEXTEDITOR_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
-
-file(GLOB khtml_files_sip sip/khtml/*.sip)
-set(SIP_EXTRA_FILES_DEPEND ${khtml_files_sip})
-add_sip_python_module(PyKDE4.khtml sip/khtml/khtmlmod.sip ${KDE4_KHTML_LIBS})
-
-file(GLOB knewstuff_files_sip sip/knewstuff/*.sip)
-set(SIP_EXTRA_FILES_DEPEND ${knewstuff_files_sip})
-add_sip_python_module(PyKDE4.knewstuff sip/knewstuff/knewstuffmod.sip ${KDE4_KNEWSTUFF2_LIBS} ${KDE4_KNEWSTUFF3_LIBS} ${QT_QTCORE_LIBRARY})
-
-file(GLOB dnssd_files_sip sip/dnssd/*.sip)
-set(SIP_EXTRA_FILES_DEPEND ${dnssd_files_sip})
-add_sip_python_module(PyKDE4.dnssd sip/dnssd/dnssdmod.sip ${KDE4_KDNSSD_LIBS} ${QT_QTCORE_LIBRARY})
-
-file(GLOB phonon_files_sip sip/phonon/*.sip)
-set(SIP_EXTRA_FILES_DEPEND ${phonon_files_sip})
-add_sip_python_module(PyKDE4.phonon sip/phonon/phononmod.sip ${PHONON_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
-
-file(GLOB plasma_files_sip sip/plasma/*.sip)
-set(SIP_EXTRA_FILES_DEPEND ${plasma_files_sip})
-add_sip_python_module(PyKDE4.plasma sip/plasma/plasmamod.sip ${KDE4_PLASMA_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTUITOOLS_LIBRARY} ${KDE4_KIO_LIBRARY} ${KDE4_KDECORE_LIBRARY} ${KDE4_KDEUI_LIBRARY})
-
-file(GLOB kterminal_files_sip sip/kterminal/*.sip)
-set(SIP_EXTRA_FILES_DEPEND ${kterminal_files_sip})
-add_sip_python_module(PyKDE4.kterminal sip/kterminal/kterminalmod.sip ${KDE4_TERMINAL_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
-
-set(PYKDE_MODULES "kdecore solid kdeui kio kutils kparts ktexteditor dnssd phonon plasma kterminal")
-
-if(Soprano_FOUND)
-    include_directories(${SOPRANO_INCLUDE_DIR})
-    file(GLOB soprano_files_sip sip/soprano/*.sip)
-    set(SIP_EXTRA_FILES_DEPEND ${soprano_files_sip})
-    add_sip_python_module(PyKDE4.soprano sip/soprano/sopranomod.sip ${SOPRANO_LIBRARIES} ${SOPRANO_CLIENT_LIBRARIES} ${SOPRANO_SERVER_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY})
-    set(PYKDE_MODULES "${PYKDE_MODULES} soprano")
-endif()
-
-if(Nepomuk_FOUND)
-    include_directories(${NEPOMUK_INCLUDE_DIR})
-    file(GLOB nepomuk_files_sip sip/nepomuk/*.sip)
-    set(SIP_EXTRA_FILES_DEPEND ${nepomuk_files_sip})
-    add_sip_python_module(PyKDE4.nepomuk sip/nepomuk/nepomukmod.sip ${NEPOMUK_LIBRARIES} ${NEPOMUK_QUERY_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${SOPRANO_LIBRARIES} ${KDE4_KIO_LIBS})
-    set(PYKDE_MODULES "${PYKDE_MODULES} nepomuk")
-endif()
-
-if(KdepimLibs_FOUND)
-    find_package(Boost 1.34.0)
-    set_package_properties(Boost PROPERTIES DESCRIPTION "Boost C++ Libraries"
-                           URL "http://www.boost.org" TYPE REQUIRED
-                           PURPOSE "Boost is required by Akonadi")
-    include_directories(${KDEPIMLIBS_INCLUDE_DIRS})
-    file(GLOB akonadi_files_sip sip/akonadi/*.sip)
-    set(SIP_EXTRA_FILES_DEPEND ${akonadi_files_sip})
-    add_sip_python_module(PyKDE4.akonadi sip/akonadi/akonadimod.sip ${KDE4_AKONADI_LIBS} ${KDE4_AKONADI_KMIME_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS})
-    set(PYKDE_MODULES "${PYKDE_MODULES} akonadi")
-endif()
-
-if(POLKITQT_FOUND)
-    include_directories(${POLKITQT_INCLUDE_DIR})
-
-    file(GLOB pollkitqt_files_sip sip/polkitqt/*.sip)
-
-    # ${POLKITQT_INCLUDE_DIR} -- We don't use this directly, because we need the #includes
-    # in the .sip file to be more specific otherwise they pick up the wrong action.h etc.
-
-    set(SIP_EXTRA_FILES_DEPEND ${pollkitqt_files_sip})
-    add_sip_python_module(PyKDE4.polkitqt sip/polkitqt/polkitqtmod.sip ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${POLKITQT_LIBRARIES})
-    set(PYKDE_MODULES "${PYKDE_MODULES} polkitqt")
-endif()
-
-python_install(__init__.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKDE4)
-
-# Install the .sip files for anyone that wants to build bindings on top of PyKDE4.
-# (Don't forget the / at the end of sip/.)
-install(FILES ${CMAKE_BINARY_DIR}/pykde_config.sip DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4/)
-if(DEFAULT_PYTHON_VERSION)
-    install(DIRECTORY sip/ DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4
-        PATTERN "*~" EXCLUDE    # This sucks, why can't I just whitelist what I _do_ want?
-        PATTERN ".svn" EXCLUDE
-        PATTERN "*.in" EXCLUDE)
-    message("Installing sip files in this build pass")
-else(DEFAULT_PYTHON_VERSION)
-    message("Not installing sip files in this build pass")
-endif(DEFAULT_PYTHON_VERSION)
-
-add_subdirectory(tools)
-#add_subdirectory(docs)
-add_subdirectory(examples)
-if (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION)
-    add_subdirectory(kpythonpluginfactory)
-endif ()
-
-feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff -pruN 4:4.14.0-1/.pc/python3.3.diff/CMakeLists.txt 4:4.14.2-0ubuntu9/.pc/python3.3.diff/CMakeLists.txt
--- 4:4.14.0-1/.pc/python3.3.diff/CMakeLists.txt	1970-01-01 00:00:00.000000000 +0000
+++ 4:4.14.2-0ubuntu9/.pc/python3.3.diff/CMakeLists.txt	2017-11-22 07:27:37.000000000 +0000
@@ -0,0 +1,280 @@
+project(pykde4)
+
+cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+
+# search packages used by KDE
+find_package(KDE4 4.9.4 REQUIRED)
+
+# Match what's used in the main macros
+cmake_policy(SET CMP0002 OLD)
+find_package(PythonLibrary)
+
+include(KDE4Defaults)
+include(MacroLibrary)
+include(PythonMacros)
+include(FeatureSummary)
+
+option(PYKDEUIC4_ALTINSTALL "Enable parallel-installation of the PyKDE4 tools" FALSE)
+
+set(CMAKE_MODULE_PATH ${pykde4_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
+
+find_package(PythonLibrary)
+
+set_package_properties(KDE4 PROPERTIES DESCRIPTION "The KDE libraries"
+                       URL "http://www.kde.org" TYPE REQUIRED
+                       PURPOSE "Required to build PyKDE4")
+set_package_properties(PythonLibrary PROPERTIES DESCRIPTION
+                       "The Python Library" URL "http://www.python.org"
+                       TYPE REQUIRED PURPOSE "Required to build PyKDE4")
+set_package_properties(PythonInterp PROPERTIES
+                       DESCRIPTION "The Python interpreter"
+                       URL "http://www.python.org" TYPE REQUIRED
+                       PURPOSE "Required to build PyKDE4")
+
+include_directories(${KDE4_INCLUDES})
+
+add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DQT3_SUPPORT)
+
+find_package(SIP)
+set_package_properties(SIP PROPERTIES DESCRIPTION "The SIP binding generator"
+                       URL "http://riverbankcomputing.com" TYPE REQUIRED
+                       PURPOSE "Required to build PyKDE4")
+
+include(SIPMacros)
+
+if(SIP_VERSION STRLESS "040e00")    # These version numbers also appear in ../CMakeLists.txt
+    message(FATAL_ERROR "The version of SIP found is too old. 4.14 or later is needed.")
+endif()
+
+find_package(PyQt4)
+set_package_properties(PyQt4 PROPERTIES DESCRIPTION "The PyQt bindings"
+                       URL "http://riverbankcomputing.com" TYPE REQUIRED
+                       PURPOSE "Required to build PyKDE4")
+
+if(PYQT4_VERSION STRLESS "040905")  # These version numbers also appear in ../CMakeLists.txt
+    message(FATAL_ERROR "The version of PyQt found is too old. 4.9 or later is required.")
+endif()
+
+macro_optional_find_package(Soprano)
+set_package_properties(Soprano PROPERTIES DESCRIPTION "The Soprano libraries"
+                       URL "http://projects.kde.org/kdesupport/soprano"
+                       TYPE OPTIONAL PURPOSE
+                       "Required for Soprano Python bindings")
+
+macro_optional_find_package(Nepomuk)
+set_package_properties(Nepomuk PROPERTIES DESCRIPTION "The Nepomuk libraries"
+                       URL "http://projects.kde.org/kde/kdelibs/" TYPE OPTIONAL
+                       PURPOSE "Required for Nepomuk Python bindings")
+
+macro_optional_find_package(KdepimLibs)
+set_package_properties(KdepimLibs PROPERTIES DESCRIPTION "The KDE PIM libraries"
+                       URL "http://projects.kde.org/kde/kdepimlibs" TYPE OPTIONAL
+                       PURPOSE "Required for the Akonadi Python bindings")
+
+macro_optional_find_package(PolkitQt)
+set_package_properties(PolkitQt PROPERTIES DESCRIPTION "Qt wrapper around Polkit"
+                       TYPE OPTIONAL PURPOSE
+                       "Required to build Python Polkit bindings")
+
+include_directories(
+    ${PYTHON_INCLUDE_PATH}
+    ${SIP_INCLUDE_DIR}
+    ${QT_INCLUDE_DIR}
+    ${QT_QT_INCLUDE_DIR}
+    ${QT_QTCORE_INCLUDE_DIR}
+    ${QT_QTDESIGNER_INCLUDE_DIR}
+    ${QT_QTGUI_INCLUDE_DIR}
+    ${QT_QTNETWORK_INCLUDE_DIR}
+    ${QT_QTOPENGL_INCLUDE_DIR}
+    ${QT_QTSQL_INCLUDE_DIR}
+    ${QT_QTXML_INCLUDE_DIR}
+    ${QT_QTSVG_INCLUDE_DIR}
+    ${QT_QTWEBKIT_INCLUDE_DIR}
+    ${KDE4_INCLUDE_DIR}
+    ${KDE4_INCLUDE_DIR}/solid
+    ${KDE4_INCLUDE_DIR}/kio
+    ${KDE4_INCLUDE_DIR}/dom
+    ${KDE4_INCLUDE_DIR}/ksettings
+    ${KDE4_INCLUDE_DIR}/knewstuff2
+    ${KDE4_INCLUDE_DIR}/dnssd
+    ${KDE4_PHONON_INCLUDES}
+    ${KDEPIMLIBS_INCLUDE_DIRS}
+)
+
+# Pull in ARM configuration options if needed
+STRING(REGEX MATCH "PyQt_qreal_double" SIP_ARM_HACK ${PYQT4_SIP_FLAGS} "")
+
+set(SIP_INCLUDES ${CMAKE_BINARY_DIR} ${PYQT4_SIP_DIR} sip)
+set(SIP_CONCAT_PARTS 8)
+if (WIN32)
+    set(SIP_TAGS ALL WS_WIN ${PYQT4_VERSION_TAG})
+else ()
+    set(SIP_TAGS ALL WS_X11 ${PYQT4_VERSION_TAG})
+endif ()
+set(SIP_DISABLE_FEATURES VendorID PyQt_NoPrintRangeBug ${SIP_ARM_HACK})
+
+set(SIP_FILES_INSTALL_DIR ${SHARE_INSTALL_PREFIX}/sip)
+
+# Use an extra option when compiling on Python 3.
+if (PYTHON_VERSION_MAJOR GREATER 2)
+    if(PYQT4_VERSION STRGREATER "040904")
+	    # Disable for features in newer Qt
+        if (PYQT4_VERSION STRGREATER "040a04")
+            # GLuint + QVector (PyQt > 4.11)
+            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector -x PyKDE_GLuint)
+        else ()
+            # QVector (PyQt < 4.11)
+            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector)
+        endif ()
+    else ()
+	    set(SIP_EXTRA_OPTIONS -g)
+    endif()
+else (PYTHON_VERSION_MAJOR GREATER 2)
+    if(PYQT4_VERSION STRGREATER "040904")
+	# Disable for newer PyQt
+        if (PYQT4_VERSION STRGREATER "040a04")
+            # GLuint + QVector (PyQt > 4.11)
+            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector -x Py_v3 -x PyKDE_GLuint)
+        else ()
+            # QVector (PyQt < 4.11)
+            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector -x Py_v3)
+        endif ()
+    else ()
+	    set(SIP_EXTRA_OPTIONS -g -x Py_v3)
+    endif()
+endif ()
+
+add_definitions(-D_REENTRANT -DQT_CORE_LIB -DQT_GUI_LIB -DUSING_SOPRANO_NRLMODEL_UNSTABLE_API -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public)
+
+include(PyKDEConfigurationInformation.cmake)
+
+# Only install pykdeconfig.py if PyQt itself has installed pyqtconfig.py, since
+# its absence indicates PyQt was built with the new build system and
+# pykdeconfig will not work.
+execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import PyQt4.pyqtconfig"
+                RESULT_VARIABLE _exit_code OUTPUT_QUIET ERROR_QUIET)
+if (NOT _exit_code)
+    python_install(${CMAKE_CURRENT_BINARY_DIR}/pykdeconfig.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKDE4)
+endif ()
+
+# Do not use --no-undefined for python modules.
+STRING(REPLACE -Wl,--no-undefined "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+
+file(GLOB kdecore_files_sip sip/kdecore/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${kdecore_files_sip})
+add_sip_python_module(PyKDE4.kdecore sip/kdecore/kdecoremod.sip ${KDE4_KDECORE_LIBS} ${KDE4_KPTY_LIBS} ${QT_QTNETWORK_LIBRARY})
+
+file(GLOB solid_files_sip sip/solid/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${solid_files_sip})
+add_sip_python_module(PyKDE4.solid sip/solid/solidmod.sip ${KDE4_SOLID_LIBS} ${QT_QTCORE_LIBRARY})
+
+file(GLOB kdeui_files_sip sip/kdeui/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${kdeui_files_sip})
+add_sip_python_module(PyKDE4.kdeui sip/kdeui/kdeuimod.sip ${KDE4_KDEUI_LIBS} ${QT_QTXML_LIBRARY})
+
+file(GLOB kio_files_sip sip/kio/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${kio_files_sip})
+add_sip_python_module(PyKDE4.kio sip/kio/kiomod.sip ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS})
+
+file(GLOB kutils_files_sip sip/kutils/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${kutils_files_sip})
+add_sip_python_module(PyKDE4.kutils sip/kutils/kutilsmod.sip ${KDE4_KUTILS_LIBS} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${KDE4_KDEUI_LIBS})
+
+file(GLOB kparts_files_sip sip/kparts/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${kparts_files_sip})
+add_sip_python_module(PyKDE4.kparts sip/kparts/kpartsmod.sip ${KDE4_KPARTS_LIBS})
+
+file(GLOB ktexteditor_files_sip sip/ktexteditor/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${ktexteditor_files_sip})
+add_sip_python_module(PyKDE4.ktexteditor sip/ktexteditor/ktexteditormod.sip ${KDE4_KTEXTEDITOR_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+
+file(GLOB khtml_files_sip sip/khtml/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${khtml_files_sip})
+add_sip_python_module(PyKDE4.khtml sip/khtml/khtmlmod.sip ${KDE4_KHTML_LIBS})
+
+file(GLOB knewstuff_files_sip sip/knewstuff/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${knewstuff_files_sip})
+add_sip_python_module(PyKDE4.knewstuff sip/knewstuff/knewstuffmod.sip ${KDE4_KNEWSTUFF2_LIBS} ${KDE4_KNEWSTUFF3_LIBS} ${QT_QTCORE_LIBRARY})
+
+file(GLOB dnssd_files_sip sip/dnssd/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${dnssd_files_sip})
+add_sip_python_module(PyKDE4.dnssd sip/dnssd/dnssdmod.sip ${KDE4_KDNSSD_LIBS} ${QT_QTCORE_LIBRARY})
+
+file(GLOB phonon_files_sip sip/phonon/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${phonon_files_sip})
+add_sip_python_module(PyKDE4.phonon sip/phonon/phononmod.sip ${PHONON_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+
+file(GLOB plasma_files_sip sip/plasma/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${plasma_files_sip})
+add_sip_python_module(PyKDE4.plasma sip/plasma/plasmamod.sip ${KDE4_PLASMA_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTUITOOLS_LIBRARY} ${KDE4_KIO_LIBRARY} ${KDE4_KDECORE_LIBRARY} ${KDE4_KDEUI_LIBRARY})
+
+file(GLOB kterminal_files_sip sip/kterminal/*.sip)
+set(SIP_EXTRA_FILES_DEPEND ${kterminal_files_sip})
+add_sip_python_module(PyKDE4.kterminal sip/kterminal/kterminalmod.sip ${KDE4_TERMINAL_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+
+set(PYKDE_MODULES "kdecore solid kdeui kio kutils kparts ktexteditor dnssd phonon plasma kterminal")
+
+if(Soprano_FOUND)
+    include_directories(${SOPRANO_INCLUDE_DIR})
+    file(GLOB soprano_files_sip sip/soprano/*.sip)
+    set(SIP_EXTRA_FILES_DEPEND ${soprano_files_sip})
+    add_sip_python_module(PyKDE4.soprano sip/soprano/sopranomod.sip ${SOPRANO_LIBRARIES} ${SOPRANO_CLIENT_LIBRARIES} ${SOPRANO_SERVER_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY})
+    set(PYKDE_MODULES "${PYKDE_MODULES} soprano")
+endif()
+
+if(Nepomuk_FOUND)
+    include_directories(${NEPOMUK_INCLUDE_DIR})
+    file(GLOB nepomuk_files_sip sip/nepomuk/*.sip)
+    set(SIP_EXTRA_FILES_DEPEND ${nepomuk_files_sip})
+    add_sip_python_module(PyKDE4.nepomuk sip/nepomuk/nepomukmod.sip ${NEPOMUK_LIBRARIES} ${NEPOMUK_QUERY_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${SOPRANO_LIBRARIES} ${KDE4_KIO_LIBS})
+    set(PYKDE_MODULES "${PYKDE_MODULES} nepomuk")
+endif()
+
+if(KdepimLibs_FOUND)
+    find_package(Boost 1.34.0)
+    set_package_properties(Boost PROPERTIES DESCRIPTION "Boost C++ Libraries"
+                           URL "http://www.boost.org" TYPE REQUIRED
+                           PURPOSE "Boost is required by Akonadi")
+    include_directories(${KDEPIMLIBS_INCLUDE_DIRS})
+    file(GLOB akonadi_files_sip sip/akonadi/*.sip)
+    set(SIP_EXTRA_FILES_DEPEND ${akonadi_files_sip})
+    add_sip_python_module(PyKDE4.akonadi sip/akonadi/akonadimod.sip ${KDE4_AKONADI_LIBS} ${KDE4_AKONADI_KMIME_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS})
+    set(PYKDE_MODULES "${PYKDE_MODULES} akonadi")
+endif()
+
+if(POLKITQT_FOUND)
+    include_directories(${POLKITQT_INCLUDE_DIR})
+
+    file(GLOB pollkitqt_files_sip sip/polkitqt/*.sip)
+
+    # ${POLKITQT_INCLUDE_DIR} -- We don't use this directly, because we need the #includes
+    # in the .sip file to be more specific otherwise they pick up the wrong action.h etc.
+
+    set(SIP_EXTRA_FILES_DEPEND ${pollkitqt_files_sip})
+    add_sip_python_module(PyKDE4.polkitqt sip/polkitqt/polkitqtmod.sip ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${POLKITQT_LIBRARIES})
+    set(PYKDE_MODULES "${PYKDE_MODULES} polkitqt")
+endif()
+
+python_install(__init__.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKDE4)
+
+# Install the .sip files for anyone that wants to build bindings on top of PyKDE4.
+# (Don't forget the / at the end of sip/.)
+install(FILES ${CMAKE_BINARY_DIR}/pykde_config.sip DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4/)
+if(DEFAULT_PYTHON_VERSION)
+  install(DIRECTORY sip/ DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4
+        PATTERN "*~" EXCLUDE    # This sucks, why can't I just whitelist what I _do_ want?
+        PATTERN ".svn" EXCLUDE
+        PATTERN "*.in" EXCLUDE)
+   message("Installing sip files in this build pass")
+else(DEFAULT_PYTHON_VERSION)
+   message("Not installing sip files in this build pass")
+endif(DEFAULT_PYTHON_VERSION)
+
+add_subdirectory(tools)
+#add_subdirectory(docs)
+add_subdirectory(examples)
+if (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION)
+    add_subdirectory(kpythonpluginfactory)
+endif (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION)
+
+feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff -pruN 4:4.14.0-1/.pc/pythonpluginfactory_python3.diff/CMakeLists.txt 4:4.14.2-0ubuntu9/.pc/pythonpluginfactory_python3.diff/CMakeLists.txt
--- 4:4.14.0-1/.pc/pythonpluginfactory_python3.diff/CMakeLists.txt	2017-11-22 07:27:36.000000000 +0000
+++ 4:4.14.2-0ubuntu9/.pc/pythonpluginfactory_python3.diff/CMakeLists.txt	2017-11-22 07:27:37.000000000 +0000
@@ -13,13 +13,15 @@ include(KDE4Defaults)
 include(MacroLibrary)
 include(PythonMacros)
 include(FeatureSummary)
+find_package(PkgConfig REQUIRED)
+# this doesn't work ...
+pkg_check_modules(PYTHON xpython${_CURRENT_VERSION})
 
 option(PYKDEUIC4_ALTINSTALL "Enable parallel-installation of the PyKDE4 tools" FALSE)
 
 set(CMAKE_MODULE_PATH ${pykde4_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
 
 find_package(PythonLibrary)
-find_package(PythonLibs)
 
 set_package_properties(KDE4 PROPERTIES DESCRIPTION "The KDE libraries"
                        URL "http://www.kde.org" TYPE REQUIRED
@@ -78,8 +80,7 @@ set_package_properties(PolkitQt PROPERTI
                        "Required to build Python Polkit bindings")
 
 include_directories(
-    ${PYTHON_INCLUDE_DIR}
-    ${PYTHON_INCLUDE_DIR2}
+    ${PYTHON_INCLUDE_PATH}
     ${SIP_INCLUDE_DIR}
     ${QT_INCLUDE_DIR}
     ${QT_QT_INCLUDE_DIR}
@@ -263,13 +264,13 @@ python_install(__init__.py ${PYTHON_SITE
 # (Don't forget the / at the end of sip/.)
 install(FILES ${CMAKE_BINARY_DIR}/pykde_config.sip DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4/)
 if(DEFAULT_PYTHON_VERSION)
-    install(DIRECTORY sip/ DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4
+  install(DIRECTORY sip/ DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4
         PATTERN "*~" EXCLUDE    # This sucks, why can't I just whitelist what I _do_ want?
         PATTERN ".svn" EXCLUDE
         PATTERN "*.in" EXCLUDE)
-    message("Installing sip files in this build pass")
+   message("Installing sip files in this build pass")
 else(DEFAULT_PYTHON_VERSION)
-    message("Not installing sip files in this build pass")
+   message("Not installing sip files in this build pass")
 endif(DEFAULT_PYTHON_VERSION)
 
 add_subdirectory(tools)
@@ -277,6 +278,6 @@ add_subdirectory(tools)
 add_subdirectory(examples)
 if (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION)
     add_subdirectory(kpythonpluginfactory)
-endif ()
+endif (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION)
 
 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
