diff --git a/gobject-introspection.spec b/gobject-introspection.spec index 3cbcc17..cb37661 100644 --- a/gobject-introspection.spec +++ b/gobject-introspection.spec @@ -2,7 +2,7 @@ Name: gobject-introspection Version: 1.76.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Introspection system for GObject-based libraries License: GPL-2.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause @@ -10,6 +10,9 @@ URL: https://wiki.gnome.org/Projects/GObjectIntrospection Source0: https://download.gnome.org/sources/%{name}/1.76/%{name}-%{version}.tar.xz # https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/458 Patch0: gobject-introspection-1.76.1-revert-failing-test.patch +# Workaround for Python 3.12 compatibility +# https://bugzilla.redhat.com/show_bug.cgi?id=2208966 +Patch1: workaround.patch BuildRequires: bison BuildRequires: flex @@ -52,6 +55,7 @@ Libraries and headers for gobject-introspection %prep %autosetup -p1 +mv giscanner/ast.py giscanner/gio_ast.py %build %meson -Ddoctool=enabled -Dgtk_doc=true -Dpython=%{__python3} @@ -91,6 +95,9 @@ Libraries and headers for gobject-introspection %{_mandir}/man1/g-ir-scanner.1* %changelog +* Fri Jun 09 2023 Tomáš Hrnčiar - 1.76.1-3 +- Add workaround patch for compatibility with Python 3.12 + * Fri May 19 2023 David King - 1.76.1-2 - Enable tests during check phase diff --git a/workaround.patch b/workaround.patch new file mode 100644 index 0000000..5bb9896 --- /dev/null +++ b/workaround.patch @@ -0,0 +1,24 @@ +diff -rU3 gobject-introspection-1.76.1-orig/giscanner/__init__.py gobject-introspection-1.76.1/giscanner/__init__.py +--- gobject-introspection-1.76.1-orig/giscanner/__init__.py 2023-03-22 23:43:34.000000000 +0100 ++++ gobject-introspection-1.76.1/giscanner/__init__.py 2023-06-07 11:50:00.217226422 +0200 +@@ -25,3 +25,8 @@ + from ._version import __version__ + except ImportError: + __version__ = '0.0.0' ++ ++from . import gio_ast as ast ++ ++import sys ++sys.modules['giscanner.ast'] = ast +diff -rU3 gobject-introspection-1.76.1-orig/giscanner/meson.build gobject-introspection-1.76.1/giscanner/meson.build +--- gobject-introspection-1.76.1-orig/giscanner/meson.build 2023-03-22 23:43:34.000000000 +0100 ++++ gobject-introspection-1.76.1/giscanner/meson.build 2023-06-07 11:48:32.922732028 +0200 +@@ -2,7 +2,7 @@ + '__init__.py', + 'annotationmain.py', + 'annotationparser.py', +- 'ast.py', ++ 'gio_ast.py', + 'cachestore.py', + 'ccompiler.py', + 'codegen.py',