From 43e1396cf45c4cacc0bb24bdf885f740b96df548335ed5bee4b92a7f331838b9 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 13 Jul 2018 06:59:29 +0000 Subject: [PATCH] Accepting request 622422 from openSUSE:Factory:zSystems - add Don-t-raise-StopIteration-in-generators-no-longer-al.patch It fixes build of pango on s390x. OBS-URL: https://build.opensuse.org/request/show/622422 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/meson?expand=0&rev=102 --- ...Iteration-in-generators-no-longer-al.patch | 32 +++++++++++++++++++ meson.changes | 5 +++ meson.spec | 3 ++ 3 files changed, 40 insertions(+) create mode 100644 Don-t-raise-StopIteration-in-generators-no-longer-al.patch diff --git a/Don-t-raise-StopIteration-in-generators-no-longer-al.patch b/Don-t-raise-StopIteration-in-generators-no-longer-al.patch new file mode 100644 index 0000000..4ed1bbc --- /dev/null +++ b/Don-t-raise-StopIteration-in-generators-no-longer-al.patch @@ -0,0 +1,32 @@ +From: Christoph Reiter +Date: Mon, 28 May 2018 09:32:19 +0200 +Subject: Don't raise StopIteration in generators, no longer allowed with + Python 3.7. Fixes #3622 +Patch-mainline: 0.47.1 + +Raising StopIteration from a generator has been deprecated with Python 3.5 and is now +an error with Python 3.7: https://docs.python.org/3.8/library/exceptions.html#StopIteration + +Just use return instead. + +Signed-off-by: Jiri Slaby +--- + mesonbuild/compilers/compilers.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py +index 762e7c56..56a0ab2b 100644 +--- a/mesonbuild/compilers/compilers.py ++++ b/mesonbuild/compilers/compilers.py +@@ -796,7 +796,7 @@ class Compiler: + mlog.debug('Cached compiler stdout:\n', p.stdo) + mlog.debug('Cached compiler stderr:\n', p.stde) + yield p +- raise StopIteration ++ return + try: + with tempfile.TemporaryDirectory() as tmpdirname: + if isinstance(code, str): +-- +2.12.3 + diff --git a/meson.changes b/meson.changes index 55963ad..7e97c9c 100644 --- a/meson.changes +++ b/meson.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 13 06:00:48 UTC 2018 - jslaby@suse.com + +- add Don-t-raise-StopIteration-in-generators-no-longer-al.patch + ------------------------------------------------------------------- Sun May 20 14:20:31 UTC 2018 - dimstar@opensuse.org diff --git a/meson.spec b/meson.spec index aa1fa44..ca58bcb 100644 --- a/meson.spec +++ b/meson.spec @@ -45,6 +45,8 @@ Patch3: meson-suse-fix-llvm-3.8.patch Patch4: meson-restore-python3.4.patch # PATCH-FIX-OPENSUSE meson-fix-gcc48.patch sor.alexei@meowr.ru -- Fix GCC 4.8 handling for openSUSE Leap 42.x. Patch5: meson-fix-gcc48.patch +# PATCH-FIX-UPSTREAM Don-t-raise-StopIteration-in-generators-no-longer-al.patch -- Don't raise StopIteration in generators, no longer allowed with Python 3.7. Fixes #3622 +Patch6: Don-t-raise-StopIteration-in-generators-no-longer-al.patch BuildRequires: python3-base BuildArch: noarch %if %{testsuite} @@ -137,6 +139,7 @@ This package provides support for meson.build files in Vim. %patch4 -p1 %patch5 -p1 %endif +%patch6 -p1 # Remove static boost tests from test cases/frameworks/1 boost (can't use patch due to spaces in dirname) sed -i "/static/d" test\ cases/frameworks/1\ boost/meson.build