From 8a0f339571229855c7e25e7675fa24737fdcfd11 Mon Sep 17 00:00:00 2001 From: cherry530 <707078654@qq.com> Date: Thu, 20 Jul 2023 10:45:12 +0800 Subject: [PATCH] fix build error with python 3.11.4 Signed-off-by: cherry530 <707078654@qq.com> --- PyQt4-4.12.3-pyframe_getback.patch | 12 ++++++++++++ PyQt4.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 PyQt4-4.12.3-pyframe_getback.patch diff --git a/PyQt4-4.12.3-pyframe_getback.patch b/PyQt4-4.12.3-pyframe_getback.patch new file mode 100644 index 0000000..cd7401f --- /dev/null +++ b/PyQt4-4.12.3-pyframe_getback.patch @@ -0,0 +1,12 @@ +diff -up PyQt4_gpl_x11-4.12.3/qpy/QtCore/qpycore_classinfo.cpp.me PyQt4_gpl_x11-4.12.3/qpy/QtCore/qpycore_classinfo.cpp +--- PyQt4_gpl_x11-4.12.3/qpy/QtCore/qpycore_classinfo.cpp.me 2022-06-21 15:04:28.885197054 +0200 ++++ PyQt4_gpl_x11-4.12.3/qpy/QtCore/qpycore_classinfo.cpp 2022-06-21 15:04:51.654741730 +0200 +@@ -36,7 +36,7 @@ PyObject *qpycore_ClassInfo(const char * + + // We need the frame we were called from, not the current one. + if (frame) +- frame = frame->f_back; ++ frame = PyFrame_GetBack(frame); + + if (!frame) + { diff --git a/PyQt4.spec b/PyQt4.spec index ed0bb40..55b111e 100644 --- a/PyQt4.spec +++ b/PyQt4.spec @@ -3,13 +3,15 @@ %global __provides_exclude_from ^(%{python3_sitearch}/.*\\.so|%{_qt4_plugindir}/.*\\.so)$ Name: PyQt4 Version: 4.12.3 -Release: 1 +Release: 2 Summary: Python bindings for Qt4 License: (GPLv3 or GPLv2 with exceptions) and BSD Url: http://www.riverbankcomputing.com/software/pyqt/ Source0: http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-%{version}/PyQt4_gpl_x11-%{version}.tar.gz/download?use_mirror=ufpr#/PyQt4_gpl_x11-%{version}.tar.gz Patch0001: qreal_float_support.diff +Patch0002: PyQt4-4.12.3-pyframe_getback.patch + BuildRequires: chrpath dbus-python findutils gcc-c++ pkgconfig(dbus-1) pkgconfig(dbus-python) pkgconfig(phonon) BuildRequires: pkgconfig(QtDBus) pkgconfig(QtDeclarative) pkgconfig(QtDesigner) pkgconfig(QtGui) pkgconfig(QtHelp) BuildRequires: pkgconfig(QtMultimedia) pkgconfig(QtNetwork) pkgconfig(QtOpenGL) pkgconfig(QtScript) pkgconfig(QtScriptTools) @@ -109,6 +111,9 @@ diff -u ./sip/QtGui/opengl_types.sip.orig ./sip/QtGui/opengl_types.sip ||: %{_datadir}/python3-sip/PyQt4/ %changelog +* Thu Jul 20 2023 xu_ping <707078654@qq.com> - 4.12.3-2 +- fix build error with python 3.11.4 + * Thu Jun 23 2022 SimpleUpdate Robot - 4.12.3-1 - Upgrade to version 4.12.3 -- Gitee