From 6a982332b428769e88f7290328fa810aa3c4851e32e30ed0da3eb190d41440fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 3 Mar 2016 12:59:38 +0000 Subject: [PATCH] * 0001-Fix-python2-build-of-pyuno-with-older-py2-versions.patch OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=380 --- ...ild-of-pyuno-with-older-py2-versions.patch | 33 +++++++++++++++++++ libreoffice.changes | 1 + libreoffice.spec | 2 ++ 3 files changed, 36 insertions(+) create mode 100644 0001-Fix-python2-build-of-pyuno-with-older-py2-versions.patch diff --git a/0001-Fix-python2-build-of-pyuno-with-older-py2-versions.patch b/0001-Fix-python2-build-of-pyuno-with-older-py2-versions.patch new file mode 100644 index 0000000..0fe6f8d --- /dev/null +++ b/0001-Fix-python2-build-of-pyuno-with-older-py2-versions.patch @@ -0,0 +1,33 @@ +From 3cf65156695b965e38f0fd4cacfc9f07e1cd6e17 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= +Date: Thu, 3 Mar 2016 13:55:34 +0100 +Subject: [PATCH] Fix python2 build of pyuno with older py2 versions + +SyntaxError: ('invalid syntax', ('//usr/lib64/libreoffice/program//uno.py', +368, 77, " return _ConstantGroup({c.Name.split('.')[-1]: +c.ConstantValue for c in td.Constants})\n")) + +Change-Id: Ie87c21fbfd83fc4d6f918eb55128db235c2220a8 +--- + pyuno/source/module/uno.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py +index 4c78595..ad77ad3 100644 +--- a/pyuno/source/module/uno.py ++++ b/pyuno/source/module/uno.py +@@ -361,7 +361,10 @@ def _impl_getConstantGroupByName( module, group ): + qualifiedName = module + '.' + group + for td in tde: + if td.Name == qualifiedName: +- return _ConstantGroup({c.Name.split('.')[-1]: c.ConstantValue for c in td.Constants}) ++ return_dict = dict() ++ for c in td.Constants: ++ return_dict.update({c.Name.split('.')[-1]: c.ConstantValue}) ++ return _ConstantGroup(return_dict) + else: + raise ValueError + +-- +2.7.2 + diff --git a/libreoffice.changes b/libreoffice.changes index 2ca5ff2..36f8299 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -9,6 +9,7 @@ Wed Mar 2 16:48:33 UTC 2016 - tchvatal@suse.com - Add upstreamed patches to fix patch application on sle11: * 0001-Fix-patch-to-apply-on-SLE11-just-some-unknown-patch-.patch * 0001-Update-etonyek-patch-to-apply-with-sle11-patch.patch + * 0001-Fix-python2-build-of-pyuno-with-older-py2-versions.patch - Localy disable the services test that SEGVs on sle11 * libreoffice-disable-services-check.patch diff --git a/libreoffice.spec b/libreoffice.spec index 0e6e75e..b072c63 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -174,6 +174,7 @@ Patch7: 0001-Make-HAVE_JAVA6-be-always-false.patch # PATCH-FIX-UPSTREAM: broken patch command on sle11 fails to apply patch Patch8: 0001-Fix-patch-to-apply-on-SLE11-just-some-unknown-patch-.patch Patch9: 0001-Update-etonyek-patch-to-apply-with-sle11-patch.patch +Patch11: 0001-Fix-python2-build-of-pyuno-with-older-py2-versions.patch # PATCH-FIX-SUSE: disable services unittest that fails Patch10: libreoffice-disable-services-check.patch # try to save space by using hardlinks @@ -1039,6 +1040,7 @@ Provides additional %{langname} translations and resources for %{project}. \ %endif %patch8 -p1 %patch9 -p1 +%patch11 -p1 %if 0%{?suse_version} < 1130 %patch10 -p1 %endif