From d8ac5c4958a166c1b1ec478a7dc40e01288d7b87 Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Sun, 5 Jul 2026 21:12:53 -0400 Subject: [PATCH] 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 --- .../pyqt6/files/pyqt6-6.11.0-py3.15.patch | 17 +++++++++++++++++ dev-python/pyqt6/pyqt6-6.11.0.ebuild | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 dev-python/pyqt6/files/pyqt6-6.11.0-py3.15.patch diff --git a/dev-python/pyqt6/files/pyqt6-6.11.0-py3.15.patch b/dev-python/pyqt6/files/pyqt6-6.11.0-py3.15.patch new file mode 100644 index 0000000000000..a958770a9c9fc --- /dev/null +++ b/dev-python/pyqt6/files/pyqt6-6.11.0-py3.15.patch @@ -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) diff --git a/dev-python/pyqt6/pyqt6-6.11.0.ebuild b/dev-python/pyqt6/pyqt6-6.11.0.ebuild index 565ea36334142..2fe887c7ba7de 100644 --- a/dev-python/pyqt6/pyqt6-6.11.0.ebuild +++ b/dev-python/pyqt6/pyqt6-6.11.0.ebuild @@ -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() {