From 694792d0fd16ac02307bc05bbe87e1c4b0eba7442c98773c2335f90d2711fe8c Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 5 Jun 2024 15:08:45 +0000 Subject: [PATCH] Accepting request 1176820 from home:jengelh:branches:X11:wxWidgets - Add wxwidgets-3.2.5.patch to resolve wxPython FTBFS OBS-URL: https://build.opensuse.org/request/show/1176820 OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=51 --- python-wxPython.changes | 5 +++++ python-wxPython.spec | 1 + wxwidgets-3.2.5.patch | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 wxwidgets-3.2.5.patch diff --git a/python-wxPython.changes b/python-wxPython.changes index 4dd6c82..3b56e07 100644 --- a/python-wxPython.changes +++ b/python-wxPython.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat May 25 09:16:36 UTC 2024 - Jan Engelhardt + +- Add wxwidgets-3.2.5.patch to resolve wxPython FTBFS + ------------------------------------------------------------------- Fri Feb 23 12:16:15 UTC 2024 - Dominique Leuenberger diff --git a/python-wxPython.spec b/python-wxPython.spec index 606dcb9..0126f7d 100644 --- a/python-wxPython.spec +++ b/python-wxPython.spec @@ -111,6 +111,7 @@ Patch14: 0004-Fix-time_t-ETG-typedef-extend-DateTime.FromTimeT-tes.patch Patch112: 0001-Check-HSV-values-in-image-test.patch # PATCH-FIX-OPENSUSE - Numpy for Python 3.12 is a thing Patch113: require-numpy.patch +Patch114: wxwidgets-3.2.5.patch # TODO: Replace deprecated setup.py calls in build.py with PEP517 without building wxWidgets into the wheel BuildRequires: %{python_module base} BuildRequires: %{python_module devel} diff --git a/wxwidgets-3.2.5.patch b/wxwidgets-3.2.5.patch new file mode 100644 index 0000000..a004ebb --- /dev/null +++ b/wxwidgets-3.2.5.patch @@ -0,0 +1,34 @@ +Do not fail the wxPython build when using a wxWidgets-3.2.5 base. + +Generated by: +git diff 5622abb73deaa26dc2f6dc4cd8b4b2050396b49a..78938da1218483024b3a7acf55b5fb5513882916 etg/ + + +diff --git etg/window.py etg/window.py +index c388df76..0c035f14 100644 +--- a/etg/window.py ++++ a/etg/window.py +@@ -251,6 +251,23 @@ def run(): + return NULL; + #endif + """) ++ c.find('GetOrCreateAccessible').setCppCode("""\ ++ #if wxUSE_ACCESSIBILITY ++ return self->GetOrCreateAccessible(); ++ #else ++ wxPyRaiseNotImplemented(); ++ return NULL; ++ #endif ++ """) ++ c.find('CreateAccessible').factory = True ++ c.find('CreateAccessible').setCppCode("""\ ++ #if wxUSE_ACCESSIBILITY ++ return self->CreateAccessible(); ++ #else ++ wxPyRaiseNotImplemented(); ++ return NULL; ++ #endif ++ """) + c.find('SetAccessible.accessible').transfer = True + c.find('SetAccessible').setCppCode("""\ + #if wxUSE_ACCESSIBILITY