rebuilt by autoport with build requirements: python3-devel>=3.11.5-3mamba [release 4.12.3-6mamba;Wed Sep 27 2023]
This commit is contained in:
parent
fc4d087b56
commit
625127c19e
48
PyQt4-4.12.3-python-3.11.patch
Normal file
48
PyQt4-4.12.3-python-3.11.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From eed66bc10c5ec5e650de8b03dc1ee0b373f01a00 Mon Sep 17 00:00:00 2001
|
||||
From: LingMan <LingMan@users.noreply.github.com>
|
||||
Date: Thu, 11 May 2023 02:59:27 +0200
|
||||
Subject: [PATCH] Fix compilation against Python 3.11+
|
||||
|
||||
With Python 3.11 the internal structure of PyFrameObject (AKA struct _frame) has been removed from
|
||||
the public API.
|
||||
De jure it was always an opaque struct but now there have also been de facto changes.
|
||||
|
||||
The fix is to simply call the official PyFrame_GetBack API.
|
||||
|
||||
This change contains a fallback implementation of PyFrame_GetBack for Python 3.8 and older
|
||||
(including 2.7) as documented here:
|
||||
https://docs.python.org/3/whatsnew/3.11.html#whatsnew311-c-api-porting
|
||||
---
|
||||
qpy/QtCore/qpycore_classinfo.cpp | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/qpy/QtCore/qpycore_classinfo.cpp b/qpy/QtCore/qpycore_classinfo.cpp
|
||||
index a626df3..60de2b7 100644
|
||||
--- a/qpy/QtCore/qpycore_classinfo.cpp
|
||||
+++ b/qpy/QtCore/qpycore_classinfo.cpp
|
||||
@@ -25,6 +25,13 @@
|
||||
|
||||
#include "qpycore_classinfo.h"
|
||||
|
||||
+#if PY_VERSION_HEX < 0x030900B1
|
||||
+static inline PyFrameObject* PyFrame_GetBack(PyFrameObject *frame)
|
||||
+{
|
||||
+ Py_XINCREF(frame->f_back);
|
||||
+ return frame->f_back;
|
||||
+}
|
||||
+#endif
|
||||
|
||||
static QMultiHash<const PyFrameObject *, ClassInfo> class_info_hash;
|
||||
|
||||
@@ -36,7 +43,7 @@ PyObject *qpycore_ClassInfo(const char *name, const char *value)
|
||||
|
||||
// We need the frame we were called from, not the current one.
|
||||
if (frame)
|
||||
- frame = frame->f_back;
|
||||
+ frame = PyFrame_GetBack(frame);
|
||||
|
||||
if (!frame)
|
||||
{
|
||||
--
|
||||
2.40.1
|
||||
|
14
PyQt4.spec
14
PyQt4.spec
@ -2,7 +2,7 @@
|
||||
|
||||
Name: PyQt4
|
||||
Version: 4.12.3
|
||||
Release: 5mamba
|
||||
Release: 6mamba
|
||||
Summary: Python bindings for the Qt cross platform GUI toolkit
|
||||
Group: System/Libraries
|
||||
Vendor: openmamba
|
||||
@ -13,21 +13,24 @@ Source: https://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-%{version}
|
||||
Patch0: %{name}-egl.patch
|
||||
Patch1: %{name}-4.7.3-qreal_float_support.patch
|
||||
Patch2: PyQt4-4.9.4-x86_64.patch
|
||||
Patch3: PyQt4-4.12.3-python-3.11.patch
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: libGL-devel
|
||||
BuildRequires: libQtAssistantClient-devel
|
||||
BuildRequires: libQtDeclarative
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: libXext-devel
|
||||
BuildRequires: libdbus-devel
|
||||
BuildRequires: libgcc
|
||||
BuildRequires: libglvnd-devel
|
||||
BuildRequires: libphonon4-devel
|
||||
BuildRequires: libpython3-devel
|
||||
BuildRequires: libpython311-devel
|
||||
BuildRequires: libqt4-devel
|
||||
BuildRequires: libstdc++6-devel
|
||||
## AUTOBUILDREQ-END
|
||||
BuildRequires: python3-devel >= 3.11.5-3mamba
|
||||
BuildRequires: libpython3-devel >= 3.7.4
|
||||
BuildRequires: sip4
|
||||
BuildRequires: chrpath
|
||||
@ -70,8 +73,12 @@ This package contains the QtDesigner support components for PyQt4.
|
||||
|
||||
%prep
|
||||
%setup -q -n PyQt4_gpl_x11-%{version}
|
||||
#-D -T
|
||||
#:<< _EOF
|
||||
%patch 3 -p1 -b .python-3.11
|
||||
|
||||
%build
|
||||
#:<< _EOF
|
||||
sed -i "/generate_code(\"phonon\")/s:phonon\":&, extra_include_dirs=[\"%{_includedir}/phonon\"]:" configure.py
|
||||
|
||||
%{__python} configure.py CXXFLAGS="%{optflags}" CFLAGS="%{optflags}" \
|
||||
@ -152,6 +159,9 @@ find examples/ -type f -exec chmod 0644 {} ';'
|
||||
%{_qt4_plugindir}/designer/*
|
||||
|
||||
%changelog
|
||||
* Wed Sep 27 2023 Automatic Build System <autodist@mambasoft.it> 4.12.3-6mamba
|
||||
- rebuilt by autoport with build requirements: python3-devel>=3.11.5-3mamba
|
||||
|
||||
* Sat Mar 27 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 4.12.3-5mamba
|
||||
- x86_64, aarch64: install dbus/mainloop/qt.so under %python_sitearch
|
||||
- build only py3 version with obsoletes
|
||||
|
Loading…
Reference in New Issue
Block a user