[packages/sip] - added fix for python 3.13; release 7

qboosh qboosh at pld-linux.org
Mon Apr 7 08:00:32 CEST 2025


commit c300dacf992fcce8dbdbd1d7e679d02fbdee2b87
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Apr 7 06:38:59 2025 +0200

    - added fix for python 3.13; release 7

 sip-python.patch | 39 +++++++++++++++++++++++++++++++++++++++
 sip.spec         |  4 +++-
 2 files changed, 42 insertions(+), 1 deletion(-)
---
diff --git a/sip.spec b/sip.spec
index dd3e7f2..6055519 100644
--- a/sip.spec
+++ b/sip.spec
@@ -13,13 +13,14 @@ Summary:	Python bindings generator for C++ class libraries
 Summary(pl.UTF-8):	Generator powiązań Pythona z bibliotekami klas C++
 Name:		sip
 Version:	4.19.25
-Release:	6
+Release:	7
 Epoch:		2
 License:	SIP (redistributable, see LICENSE) or GPL v2 or GPL v3
 Group:		Development/Languages/Python
 #Source0Download: https://riverbankcomputing.com/software/sip/download
 Source0:	https://www.riverbankcomputing.com/static/Downloads/sip/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	1891a7b71c72d83951d5851ae10b2f0c
+Patch0:		%{name}-python.patch
 URL:		https://riverbankcomputing.com/software/sip/
 BuildRequires:	libstdc++-devel
 BuildRequires:	python-devel >= 1:2.3
@@ -245,6 +246,7 @@ C++ dla PyQt5 przy użyciu SIP-a.
 
 %prep
 %setup -q
+%patch -P0 -p1
 
 %build
 # configure.py notes:
diff --git a/sip-python.patch b/sip-python.patch
new file mode 100644
index 0000000..1f88bbc
--- /dev/null
+++ b/sip-python.patch
@@ -0,0 +1,39 @@
+--- sip-4.19.25/siplib/siplib.c.orig	2021-02-26 16:17:35.147922000 +0100
++++ sip-4.19.25/siplib/siplib.c	2025-04-06 20:51:28.635302717 +0200
+@@ -448,7 +448,7 @@ static PyObject *sip_api_from_datetime(c
+ static int sip_api_get_time(PyObject *obj, sipTimeDef *time);
+ static PyObject *sip_api_from_time(const sipTimeDef *time);
+ static int sip_api_is_user_type(const sipWrapperType *wt);
+-static struct _frame *sip_api_get_frame(int);
++static PyFrameObject *sip_api_get_frame(int);
+ static int sip_api_check_plugin_for_type(const sipTypeDef *td,
+         const char *name);
+ static PyObject *sip_api_unicode_new(SIP_SSIZE_T len, unsigned maxchar,
+@@ -13741,13 +13741,13 @@ static int sip_api_is_user_type(const si
+ /*
+  * Return a frame from the execution stack.
+  */
+-static struct _frame *sip_api_get_frame(int depth)
++static PyFrameObject *sip_api_get_frame(int depth)
+ {
+-    struct _frame *frame = PyEval_GetFrame();
++    PyFrameObject *frame = PyEval_GetFrame();
+ 
+     while (frame != NULL && depth > 0)
+     {
+-        frame = frame->f_back;
++        frame = PyFrame_GetBack(frame);
+         --depth;
+     }
+ 
+--- sip-4.19.25/siplib/sip.h.orig	2021-02-26 16:28:41.641785000 +0100
++++ sip-4.19.25/siplib/sip.h	2025-04-06 21:38:33.147227140 +0200
+@@ -1799,7 +1799,7 @@ typedef struct _sipAPIDef {
+     int (*api_get_time)(PyObject *, sipTimeDef *);
+     PyObject *(*api_from_time)(const sipTimeDef *);
+     int (*api_is_user_type)(const sipWrapperType *);
+-    struct _frame *(*api_get_frame)(int);
++    PyFrameObject *(*api_get_frame)(int);
+     int (*api_check_plugin_for_type)(const sipTypeDef *, const char *);
+     PyObject *(*api_unicode_new)(SIP_SSIZE_T, unsigned, int *, void **);
+     void (*api_unicode_write)(int, void *, int, unsigned);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/sip.git/commitdiff/c300dacf992fcce8dbdbd1d7e679d02fbdee2b87



More information about the pld-cvs-commit mailing list