[kate] kate: pate(python) plugins not built/packaged (#922280)

Rex Dieter rdieter at fedoraproject.org
Sun Nov 3 00:36:27 UTC 2013


commit 35c4cb196b1f9104c5c085e83c2459f1bdb8ebd7
Author: Rex Dieter <rdieter at math.unl.edu>
Date:   Sat Nov 2 19:36:31 2013 -0500

    kate: pate(python) plugins not built/packaged (#922280)

 0001-cmake_utils-fix-SyntaxError-on-Python-2.patch |   30 ++++++++++++++++++++
 kate.spec                                          |   23 ++++++++++++---
 2 files changed, 48 insertions(+), 5 deletions(-)
---
diff --git a/0001-cmake_utils-fix-SyntaxError-on-Python-2.patch b/0001-cmake_utils-fix-SyntaxError-on-Python-2.patch
new file mode 100644
index 0000000..2ca61be
--- /dev/null
+++ b/0001-cmake_utils-fix-SyntaxError-on-Python-2.patch
@@ -0,0 +1,30 @@
+From db0e2c6ddf3d909364e47c7daff68ee624d951c8 Mon Sep 17 00:00:00 2001
+From: "T.C. Hollingsworth" <tchollingsworth at gmail.com>
+Date: Fri, 1 Nov 2013 13:11:47 -0700
+Subject: [PATCH] cmake_utils: fix SyntaxError on Python 2
+
+named keyword arguments after *args are only valid in Python 3:
+http://stackoverflow.com/a/9873280/1263384
+
+(cherry picked from commit 3a803506551797cd20f52b37323484db294dd68f)
+---
+ .../pate/src/plugins/cmake_utils/command_completers/param_types.py     | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/addons/kate/pate/src/plugins/cmake_utils/command_completers/param_types.py b/addons/kate/pate/src/plugins/cmake_utils/command_completers/param_types.py
+index f4d698d..edc5b8d 100644
+--- a/addons/kate/pate/src/plugins/cmake_utils/command_completers/param_types.py
++++ b/addons/kate/pate/src/plugins/cmake_utils/command_completers/param_types.py
+@@ -211,7 +211,8 @@ class MultiSignature(object):
+ class OneOf(object):
+     '''Class to choose one of possible syntax'''
+ 
+-    def __init__(self, *syntaxes, exppos = None):
++    def __init__(self, *syntaxes, **kwargs):
++        exppos = kwargs['exppos']
+         self.syntaxes = syntaxes
+         assert(exppos is None or isinstance(exppos, int))
+         self.exppos = exppos
+-- 
+1.8.4.2
+
diff --git a/kate.spec b/kate.spec
index 91ac6b3..ba4023b 100644
--- a/kate.spec
+++ b/kate.spec
@@ -1,12 +1,11 @@
 
 # enable pate (kate python plugin), disable to bootstrap pykde4
-# sigh, ftbfs when enabled, some rpm/python bytecompiling problem
-#define pate 1
+%define pate 1
 
 Name:    kate
 Summary: Advanced Text Editor 
 Version: 4.11.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 # kwrite LGPLv2+
 # kate: app LGPLv2, plugins, LGPLv2 and LGPLv2+ and GPLv2+
@@ -24,7 +23,9 @@ Source0: http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar
 
 ## upstreamable patches
 
-# upstream patches
+## upstream patches
+# fix -pate build
+Patch0001: 0001-cmake_utils-fix-SyntaxError-on-Python-2.patch
 
 BuildRequires: desktop-file-utils
 BuildRequires: kactivities-devel >= %{version}
@@ -87,6 +88,8 @@ Requires: kde-runtime%{?_kde4_version: >= %{_kde4_version}}
 %prep
 %setup -q
 
+%patch0001 -p1 -b .0001
+
 
 %build
 mkdir -p %{_target_platform}
@@ -160,6 +163,11 @@ fi
 %{_kde4_configdir}/katerc
 %{_kde4_datadir}/kde4/services/kate*.desktop
 %{_kde4_libdir}/kde4/kate*plugin.so
+%if 0%{?pate}
+%exclude %{_kde4_appsdir}/kate/pate/
+%exclude %{_kde4_appsdir}/kate/plugins/pate/
+%exclude %{_kde4_libdir}/kde4/katepateplugin.so
+%endif
 %{_kde4_libdir}/kde4/katefiletemplates.so
 %{_kde4_appsdir}/ktexteditor_*/
 %{_kde4_datadir}/kde4/services/ktexteditor_*.desktop
@@ -204,12 +212,17 @@ fi
 %if 0%{?pate}
 %files pate
 %{python_sitearch}/PyKate4/
-%{_kde4_libdir}/kde4/pateplugin.so
+%{_kde4_appsdir}/kate/pate/
+%{_kde4_appsdir}/kate/plugins/pate/
+%{_kde4_libdir}/kde4/katepateplugin.so
 %{_kde4_datadir}/kde4/services/pate.desktop
 %endif
 
 
 %changelog
+* Sat Nov 02 2013 Rex Dieter <rdieter at fedoraproject.org> 4.11.3-2
+- kate: pate(python) plugins not built/packaged (#922280)
+
 * Sat Nov 02 2013 Rex Dieter <rdieter at fedoraproject.org> - 4.11.3-1
 - 4.11.3
 


More information about the scm-commits mailing list