SHA256
3
0
forked from pool/meson

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
This commit is contained in:
Dominique Leuenberger 2018-07-13 06:59:29 +00:00 committed by Git OBS Bridge
parent 24264d47a2
commit 43e1396cf4
3 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,32 @@
From: Christoph Reiter <reiter.christoph@gmail.com>
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 <jslaby@suse.cz>
---
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

View File

@ -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

View File

@ -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