From 0692dbb04ba1075b936c3398b673b306df481966fc05db5a5ea5e932aa45e9a4 Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Tue, 20 Jun 2023 07:09:56 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/python3-pyside2?expand=0&rev=76 --- python-3.11-compatibility.patch | 24 ++++++++++-------------- python3-pyside2.spec | 13 +++++++------ 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/python-3.11-compatibility.patch b/python-3.11-compatibility.patch index 5d20a48..5e0197a 100644 --- a/python-3.11-compatibility.patch +++ b/python-3.11-compatibility.patch @@ -1,3 +1,13 @@ +Python 3.11 support backported to pyside2. Includes these commits: + +https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=73adefe22f +https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=52df3b8f64 +https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=da2cf03152 +https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=a09a1db839 +https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=ace680f4c5 + +Note that upstream won't support these changes. + Index: pyside-setup-opensource-src-5.15.10/sources/shiboken2/libshiboken/basewrapper.cpp =================================================================== --- pyside-setup-opensource-src-5.15.10.orig/sources/shiboken2/libshiboken/basewrapper.cpp @@ -194,17 +204,3 @@ Index: pyside-setup-opensource-src-5.15.10/sources/pyside2/libpyside/pysideprope + PyObject_GC_UnTrack(self); Py_TYPE(self)->tp_free(self); } - -Index: pyside-setup-opensource-src-5.15.10/sources/pyside2/tests/signals/CMakeLists.txt -=================================================================== ---- pyside-setup-opensource-src-5.15.10.orig/sources/pyside2/tests/signals/CMakeLists.txt -+++ pyside-setup-opensource-src-5.15.10/sources/pyside2/tests/signals/CMakeLists.txt -@@ -29,7 +29,7 @@ PYSIDE_TEST(signal2signal_connect_test.p - PYSIDE_TEST(signal_across_threads.py) - PYSIDE_TEST(signal_autoconnect_test.py) - PYSIDE_TEST(signal_connectiontype_support_test.py) --PYSIDE_TEST(signal_enum_test.py) -+#PYSIDE_TEST(signal_enum_test.py) - PYSIDE_TEST(signal_emission_gui_test.py) - PYSIDE_TEST(signal_emission_test.py) - PYSIDE_TEST(signal_func_test.py) diff --git a/python3-pyside2.spec b/python3-pyside2.spec index 070e4f1..bf7d595 100644 --- a/python3-pyside2.spec +++ b/python3-pyside2.spec @@ -40,13 +40,8 @@ Patch1: 0001-Don-t-try-to-install-or-use-uic-rcc-designer-copies.patch Patch2: 0001-cmake-Don-t-assume-qhelpgenerator-is-in-PATH.patch # PATCH-FIX-UPSTREAM Patch3: 0001-Backport-Fix-GLES-builds.patch -%if 0%{?suse_version} > 1600 +%if 0%{?suse_version} > 1500 # PATCH-FIX-UPSTREAM python-3.11-compatibility.patch -# https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=73adefe22f -# https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=52df3b8f64 -# https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=da2cf03152 -# https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=a09a1db839 -# https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=ace680f4c5 Patch4: python-3.11-compatibility.patch %endif # Provide the PyPI names @@ -226,6 +221,12 @@ ctest_exclude_regex="$ctest_exclude_regex|QtScriptTools_debugger_test" ctest_exclude_regex="$ctest_exclude_regex|registry_existence_test" ctest_exclude_regex="$ctest_exclude_regex|QtWebEngineWidgets_pyside-474-qtwebengineview" ctest_exclude_regex="$ctest_exclude_regex|QtWebEngineCore_web_engine_custom_scheme" + +%if 0%{?suse_version} > 1500 +# Upstream doesn't plan to add support for python > 3.10 in pyside2. Blacklist broken test +ctest_exclude_regex="$ctest_exclude_regex|signal_enum_test" +%endif + %ifarch %{arm} # bug_307 fails on armv7l only ctest_exclude_regex="$ctest_exclude_regex|QtWidget_bug_307"