Add Python 3.9 patch

This commit is contained in:
Michael Jeanson 2020-01-16 16:37:19 -05:00
parent ac486c64a4
commit 72a2077bd9
2 changed files with 25 additions and 2 deletions

View File

@ -1,6 +1,6 @@
Name: babeltrace Name: babeltrace
Version: 1.5.7 Version: 1.5.7
Release: 4%{?dist} Release: 5%{?dist}
Summary: Trace Viewer and Converter, mainly for the Common Trace Format Summary: Trace Viewer and Converter, mainly for the Common Trace Format
License: MIT and GPLv2 License: MIT and GPLv2
URL: https://www.efficios.com/babeltrace URL: https://www.efficios.com/babeltrace
@ -8,6 +8,7 @@ Source0: https://www.efficios.com/files/%{name}/%{name}-%{version}.tar.bz
Source1: https://www.efficios.com/files/%{name}/%{name}-%{version}.tar.bz2.asc Source1: https://www.efficios.com/files/%{name}/%{name}-%{version}.tar.bz2.asc
# gpg2 --export --export-options export-minimal 7F49314A26E0DE78427680E05F1B2A0789F12B11 > gpgkey-7F49314A26E0DE78427680E05F1B2A0789F12B11.gpg # gpg2 --export --export-options export-minimal 7F49314A26E0DE78427680E05F1B2A0789F12B11 > gpgkey-7F49314A26E0DE78427680E05F1B2A0789F12B11.gpg
Source2: gpgkey-7F49314A26E0DE78427680E05F1B2A0789F12B11.gpg Source2: gpgkey-7F49314A26E0DE78427680E05F1B2A0789F12B11.gpg
Patch0: python39.patch
BuildRequires: bison >= 2.4 BuildRequires: bison >= 2.4
BuildRequires: flex >= 2.5.35 BuildRequires: flex >= 2.5.35
@ -62,7 +63,7 @@ to/from another trace format.
%prep %prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%setup -q %autosetup -p1
%build %build
# Reinitialize libtool with the fedora version to remove Rpath # Reinitialize libtool with the fedora version to remove Rpath
@ -114,6 +115,9 @@ rm -f %{buildroot}/%{_pkgdocdir}/std-ext-lib.txt
%changelog %changelog
* Thu Jan 16 2020 Michael Jeanson <mjeanson@efficios.com> - 1.5.7-5
- Add Python 3.9 patch
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.5.7-4 * Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.5.7-4
- Rebuilt for Python 3.8.0rc1 (#1748018) - Rebuilt for Python 3.8.0rc1 (#1748018)

19
python39.patch Normal file
View File

@ -0,0 +1,19 @@
diff --git a/bindings/python/babeltrace/babeltrace.i.in b/bindings/python/babeltrace/babeltrace.i.in
index a773e9b3..b3bb53a0 100644
--- a/bindings/python/babeltrace/babeltrace.i.in
+++ b/bindings/python/babeltrace/babeltrace.i.in
@@ -672,8 +672,8 @@ class CTFScope:
_scopes = [CTFScope.EVENT_FIELDS, CTFScope.EVENT_CONTEXT, CTFScope.STREAM_EVENT_CONTEXT,
CTFScope.STREAM_EVENT_HEADER, CTFScope.STREAM_PACKET_CONTEXT, CTFScope.TRACE_PACKET_HEADER]
-import collections
-class Event(collections.Mapping):
+import collections.abc
+class Event(collections.abc.Mapping):
"""
This class represents an event from the trace.
It is obtained using the TraceCollection generator functions.
--
2.17.1