Fix error on Python 3.7 (#1596230)
This commit is contained in:
parent
8ae573793a
commit
1e0bf7fbf8
27
a87496addd9160300837aa50193f4798c6f1d251.patch
Normal file
27
a87496addd9160300837aa50193f4798c6f1d251.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From a87496addd9160300837aa50193f4798c6f1d251 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||||
|
Date: Mon, 28 May 2018 09:32:19 +0200
|
||||||
|
Subject: [PATCH] Don't raise StopIteration in generators, no longer allowed
|
||||||
|
with Python 3.7. Fixes #3622
|
||||||
|
|
||||||
|
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.
|
||||||
|
---
|
||||||
|
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 762e7c569..56a0ab2b8 100644
|
||||||
|
--- a/mesonbuild/compilers/compilers.py
|
||||||
|
+++ b/mesonbuild/compilers/compilers.py
|
||||||
|
@@ -796,7 +796,7 @@ def compile(self, code, extra_args=None, mode='link', want_output=False):
|
||||||
|
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):
|
@ -4,12 +4,13 @@
|
|||||||
|
|
||||||
Name: meson
|
Name: meson
|
||||||
Version: 0.46.1
|
Version: 0.46.1
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: High productivity build system
|
Summary: High productivity build system
|
||||||
|
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: http://mesonbuild.com/
|
URL: http://mesonbuild.com/
|
||||||
Source0: https://github.com/mesonbuild/meson/archive/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/mesonbuild/meson/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: https://github.com/mesonbuild/meson/commit/a87496addd9160300837aa50193f4798c6f1d251.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Obsoletes: %{name}-gui < 0.31.0-3
|
Obsoletes: %{name}-gui < 0.31.0-3
|
||||||
@ -112,6 +113,9 @@ export MESON_PRINT_TEST_OUTPUT=1
|
|||||||
%{rpmmacrodir}/macros.%{name}
|
%{rpmmacrodir}/macros.%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 28 2018 Miro Hrončok <mhroncok@redhat.com> - 0.46.1-3
|
||||||
|
- Fix error on Python 3.7 (#1596230)
|
||||||
|
|
||||||
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 0.46.1-2
|
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 0.46.1-2
|
||||||
- Rebuilt for Python 3.7
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user