dev-python/pyqt6: enable py3.15

As usual, no tests, so can't be 100% sure that it works right.

Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens
2026-07-05 21:12:53 -04:00
parent 8f931f3c02
commit d8ac5c4958
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
https://src.fedoraproject.org/rpms/python-pyqt6/blob/rawhide/f/py315.patch
--- a/qpy/QtCore/qpycore_pyqtslot.cpp
+++ b/qpy/QtCore/qpycore_pyqtslot.cpp
@@ -24,6 +24,13 @@
#include "qpycore_pyqtslot.h"
+// PyWeakref_GetObject was removed from headers in Python 3.15 but is still
+// part of the stable ABI. Declare it here for Python 3.15+ compatibility.
+#if PY_VERSION_HEX >= 0x030f0000
+extern "C" PyObject* PyWeakref_GetObject(PyObject *ref);
+#endif
+
+
// Create the slot for a callable.
PyQtSlot::PyQtSlot(PyObject *callable, bool callable_is_method,
const Chimera::Signature *slot_signature)

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=sip
PYTHON_COMPAT=( python3_{12..14} )
PYTHON_COMPAT=( python3_{12..15} )
inherit distutils-r1 flag-o-matic multiprocessing pypi qmake-utils
# can work with older Qt depending on the features the ebuild enables,
@@ -100,6 +100,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-6.11.0-qt6.12.patch
"${FILESDIR}"/${PN}-6.11.0-py3.15.patch
)
src_prepare() {