Skip to content

Commit

Permalink
devel/py-qt5-sip: Fix build with py311 (+)
Browse files Browse the repository at this point in the history
The `_frame` struct was moved to an internal header, however the public API is
primarily read-only, and py-sip needs to build PyFrameObjects so still import
the internal headers.

Also sets the Py_BUILD_CORE define for py311a6, trying to restrict it to the frame header.

Inspired by:	cython repo
With hat:	kde
Sponsored by:	Netzkommune GmbH
  • Loading branch information
fluffykhv committed Mar 13, 2022
1 parent 2ec5df7 commit 2c5f553
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions devel/py-qt5-sip/files/patch-siplib.c
@@ -0,0 +1,15 @@
--- siplib.c.orig 2022-02-01 13:29:23 UTC
+++ siplib.c
@@ -20,6 +20,12 @@
#include <Python.h>
#include <datetime.h>
#include <frameobject.h>
+#if PY_VERSION_HEX >= 0x030b00a6
+ #ifndef Py_BUILD_CORE
+ #define Py_BUILD_CORE 1
+ #endif
+ #include "internal/pycore_frame.h"
+#endif

#include <assert.h>
#include <stdio.h>

0 comments on commit 2c5f553

Please sign in to comment.