From ee75ac2c841437106b708dbdf4f69a795e0d1e78884d57ae5b6af89c50dd203c Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 30 Nov 2024 16:15:22 +0000 Subject: [PATCH 1/3] Accepting request 1226873 from home:mcepl:branches:X11:wxWidgets - Provides: wxWidgets_API should have version number from the version of wxGTK3 used. - Clean up the SPEC file with spec-cleaner. OBS-URL: https://build.opensuse.org/request/show/1226873 OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=65 --- python-wxPython.changes | 6 ++++ python-wxPython.spec | 64 ++++++++++++++++++++--------------------- 2 files changed, 37 insertions(+), 33 deletions(-) diff --git a/python-wxPython.changes b/python-wxPython.changes index 1c5e57d..f5a9b83 100644 --- a/python-wxPython.changes +++ b/python-wxPython.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 26 12:42:27 UTC 2024 - Matej Cepl + +- Provides: wxWidgets_API should have version number from the version of wxGTK3 used. +- Clean up the SPEC file with spec-cleaner. + ------------------------------------------------------------------- Sun Nov 17 13:31:39 UTC 2024 - Ben Greiner diff --git a/python-wxPython.spec b/python-wxPython.spec index c5c31d7..6c26ec6 100644 --- a/python-wxPython.spec +++ b/python-wxPython.spec @@ -17,66 +17,63 @@ %define X_display ":98" -%bcond_without test -%bcond_without syswx -# We rebuild the ETG and SIP files for: -# - Fixing a bug in the ETG time_t typedef (see patch) -%bcond_without rebuild_sip - -%if %{with syswx} -%define wx_args --use_syswx --gtk3 -v -%else -%define wx_args --gtk3 -v -%endif - %global flavor @BUILD_FLAVOR@%{nil} -%if "%flavor" == "" +%if "%{flavor}" == "" # factory-auto requires the main build_flavor to match the specfile name %define pprefix python %define python_module() no-build-without-multibuild-flavor ExclusiveArch: donotbuild %else -%define pprefix %flavor -%if 0%{suse_version} >= 1599 +%define pprefix %{flavor} +%if 0%{?suse_version} >= 1599 # Tumbleweed has a varying number of python3 flavors. The flavor # selection here and in _multibuild must be kept in sync with the Factory # prjconf definition for pythons. If a skip is missing, all builds fail. # Extraneous build_flavors and skips are excluded automatically so future # additions can be included here early and old flavors can be removed some time # after the global drop in Factory. -%if "%flavor" != "python310" +%if "%{flavor}" != "python310" %define skip_python310 1 %endif -%if "%flavor" != "python311" +%if "%{flavor}" != "python311" %define skip_python311 1 %endif -%if "%flavor" != "python312" +%if "%{flavor}" != "python312" %define skip_python312 1 %endif -%if "%flavor" != "python313" +%if "%{flavor}" != "python313" %define skip_python313 1 %endif %else -# SLE/Leap -%{?sle15_python_module_pythons} -%if "%flavor" != "%pythons" +%if "%{flavor}" != "%{pythons}" # sle15_python_module_pythons defines the flavor, otherwise don't build %define pythons %{nil} %endif +# SLE/Leap +%{?sle15_python_module_pythons} %endif %if "%{shrink:%pythons}" == "" +%define python_module() %{flavor}-not-enabled-in-buildset-for-suse-%{?suse_version} ExclusiveArch: donotbuild -%define python_module() %flavor-not-enabled-in-buildset-for-suse-%{?suse_version} %else -%define python_files() -n %flavor-%{**} -%define python_module() %flavor-%{**} +%define python_files() -n %{flavor}-%{**} +%define python_module() %{flavor}-%{**} %define python_exec python%{expand:%%%{flavor}_bin_suffix} %define python_version %{expand:%%%{flavor}_version} %define python_sitearch %{expand:%%%{flavor}_sitearch} %define python_provides %{expand:%%%{flavor}_provides} %endif %endif - +%bcond_without test +%bcond_without syswx +# We rebuild the ETG and SIP files for: +# - Fixing a bug in the ETG time_t typedef (see patch) +%bcond_without rebuild_sip +%if %{with syswx} +%define wx_args --use_syswx --gtk3 -v +%else +%define wx_args --gtk3 -v +%endif Name: %{pprefix}-wxPython Version: 4.2.2 Release: 0 @@ -106,6 +103,13 @@ BuildRequires: c++_compiler BuildRequires: fdupes BuildRequires: pkgconfig BuildRequires: python-rpm-macros +Requires: %{pprefix}-Pillow +Requires: %{pprefix}-numpy +Requires(post): update-alternatives +Requires(postun): update-alternatives +Conflicts: %{pprefix}-wxWidgets +Provides: %{pprefix}-wxWidgets = %{version} +Provides: %{pprefix}-wxWidgets_API = %(rpm -q --queryformat='%%{version}' $(rpm -q --whatprovides wxGTK3-devel)) %if %{with syswx} BuildRequires: %{python_module sip6-devel >= 6.8.3} BuildRequires: waf @@ -129,12 +133,6 @@ BuildRequires: pkgconfig(webkit2gtk-4.0) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xtst) %endif -Requires: %{pprefix}-Pillow -Requires: %{pprefix}-numpy -Requires(post): update-alternatives -Requires(postun): update-alternatives -Conflicts: %{pprefix}-wxWidgets -Provides: %{pprefix}-wxWidgets = %{version} %if "%{python_provides}" != "" # for TW primary flavor provider Conflicts: %{python_provides}-wxWidgets @@ -170,7 +168,7 @@ platform specific code. Summary: Languages for package %{name} Group: System/Libraries Requires: %{name} = %{version} -Requires: python(abi) = %python_version +Requires: python(abi) = %{python_version} Supplements: (bundle-lang-other and %{name}) Provides: %{name}-lang-all = %{version} %if "%{python_provides}" != "" From f0bf89d82effb7ddc3c3cf75d25013a17730a5205c0db0b70b380c3e81ed080e Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 1 Dec 2024 10:56:19 +0000 Subject: [PATCH 2/3] Revert r65: nothing in openSUSE seems to require symbol 'wxWidgets_API' OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=66 --- python-wxPython.changes | 6 ---- python-wxPython.spec | 64 +++++++++++++++++++++-------------------- 2 files changed, 33 insertions(+), 37 deletions(-) diff --git a/python-wxPython.changes b/python-wxPython.changes index f5a9b83..1c5e57d 100644 --- a/python-wxPython.changes +++ b/python-wxPython.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Tue Nov 26 12:42:27 UTC 2024 - Matej Cepl - -- Provides: wxWidgets_API should have version number from the version of wxGTK3 used. -- Clean up the SPEC file with spec-cleaner. - ------------------------------------------------------------------- Sun Nov 17 13:31:39 UTC 2024 - Ben Greiner diff --git a/python-wxPython.spec b/python-wxPython.spec index 6c26ec6..c5c31d7 100644 --- a/python-wxPython.spec +++ b/python-wxPython.spec @@ -17,63 +17,66 @@ %define X_display ":98" +%bcond_without test +%bcond_without syswx +# We rebuild the ETG and SIP files for: +# - Fixing a bug in the ETG time_t typedef (see patch) +%bcond_without rebuild_sip + +%if %{with syswx} +%define wx_args --use_syswx --gtk3 -v +%else +%define wx_args --gtk3 -v +%endif + %global flavor @BUILD_FLAVOR@%{nil} -%if "%{flavor}" == "" +%if "%flavor" == "" # factory-auto requires the main build_flavor to match the specfile name %define pprefix python %define python_module() no-build-without-multibuild-flavor ExclusiveArch: donotbuild %else -%define pprefix %{flavor} -%if 0%{?suse_version} >= 1599 +%define pprefix %flavor +%if 0%{suse_version} >= 1599 # Tumbleweed has a varying number of python3 flavors. The flavor # selection here and in _multibuild must be kept in sync with the Factory # prjconf definition for pythons. If a skip is missing, all builds fail. # Extraneous build_flavors and skips are excluded automatically so future # additions can be included here early and old flavors can be removed some time # after the global drop in Factory. -%if "%{flavor}" != "python310" +%if "%flavor" != "python310" %define skip_python310 1 %endif -%if "%{flavor}" != "python311" +%if "%flavor" != "python311" %define skip_python311 1 %endif -%if "%{flavor}" != "python312" +%if "%flavor" != "python312" %define skip_python312 1 %endif -%if "%{flavor}" != "python313" +%if "%flavor" != "python313" %define skip_python313 1 %endif %else -%if "%{flavor}" != "%{pythons}" +# SLE/Leap +%{?sle15_python_module_pythons} +%if "%flavor" != "%pythons" # sle15_python_module_pythons defines the flavor, otherwise don't build %define pythons %{nil} %endif -# SLE/Leap -%{?sle15_python_module_pythons} %endif %if "%{shrink:%pythons}" == "" -%define python_module() %{flavor}-not-enabled-in-buildset-for-suse-%{?suse_version} ExclusiveArch: donotbuild +%define python_module() %flavor-not-enabled-in-buildset-for-suse-%{?suse_version} %else -%define python_files() -n %{flavor}-%{**} -%define python_module() %{flavor}-%{**} +%define python_files() -n %flavor-%{**} +%define python_module() %flavor-%{**} %define python_exec python%{expand:%%%{flavor}_bin_suffix} %define python_version %{expand:%%%{flavor}_version} %define python_sitearch %{expand:%%%{flavor}_sitearch} %define python_provides %{expand:%%%{flavor}_provides} %endif %endif -%bcond_without test -%bcond_without syswx -# We rebuild the ETG and SIP files for: -# - Fixing a bug in the ETG time_t typedef (see patch) -%bcond_without rebuild_sip -%if %{with syswx} -%define wx_args --use_syswx --gtk3 -v -%else -%define wx_args --gtk3 -v -%endif + Name: %{pprefix}-wxPython Version: 4.2.2 Release: 0 @@ -103,13 +106,6 @@ BuildRequires: c++_compiler BuildRequires: fdupes BuildRequires: pkgconfig BuildRequires: python-rpm-macros -Requires: %{pprefix}-Pillow -Requires: %{pprefix}-numpy -Requires(post): update-alternatives -Requires(postun): update-alternatives -Conflicts: %{pprefix}-wxWidgets -Provides: %{pprefix}-wxWidgets = %{version} -Provides: %{pprefix}-wxWidgets_API = %(rpm -q --queryformat='%%{version}' $(rpm -q --whatprovides wxGTK3-devel)) %if %{with syswx} BuildRequires: %{python_module sip6-devel >= 6.8.3} BuildRequires: waf @@ -133,6 +129,12 @@ BuildRequires: pkgconfig(webkit2gtk-4.0) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xtst) %endif +Requires: %{pprefix}-Pillow +Requires: %{pprefix}-numpy +Requires(post): update-alternatives +Requires(postun): update-alternatives +Conflicts: %{pprefix}-wxWidgets +Provides: %{pprefix}-wxWidgets = %{version} %if "%{python_provides}" != "" # for TW primary flavor provider Conflicts: %{python_provides}-wxWidgets @@ -168,7 +170,7 @@ platform specific code. Summary: Languages for package %{name} Group: System/Libraries Requires: %{name} = %{version} -Requires: python(abi) = %{python_version} +Requires: python(abi) = %python_version Supplements: (bundle-lang-other and %{name}) Provides: %{name}-lang-all = %{version} %if "%{python_provides}" != "" From a1f0c5896d835adbf9854e89873eb5c7c08c66b7cf3b0ad1a6f0e5b063456bdb Mon Sep 17 00:00:00 2001 From: Ana Guerrero Date: Wed, 22 Jan 2025 13:52:41 +0000 Subject: [PATCH 3/3] Accepting request 1239184 from home:mcalabkova:branches:devel:languages:python:Factory - Add patch python-3.13.1.patch to fix tests with Python 3.13.1 - Factory is not built on Python 3.10 anymore OBS-URL: https://build.opensuse.org/request/show/1239184 OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=67 --- _multibuild | 1 - python-3.13.1.patch | 27 +++++++++++++++++++++++++++ python-wxPython.changes | 6 ++++++ python-wxPython.spec | 4 +++- 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 python-3.13.1.patch diff --git a/_multibuild b/_multibuild index 4b47ae4..8d11b62 100644 --- a/_multibuild +++ b/_multibuild @@ -1,5 +1,4 @@ - python310 python311 python312 python313 diff --git a/python-3.13.1.patch b/python-3.13.1.patch new file mode 100644 index 0000000..7628f37 --- /dev/null +++ b/python-3.13.1.patch @@ -0,0 +1,27 @@ +Index: wxPython-4.2.2/unittests/test_cmdproc.py +=================================================================== +--- wxPython-4.2.2.orig/unittests/test_cmdproc.py ++++ wxPython-4.2.2/unittests/test_cmdproc.py +@@ -41,19 +41,19 @@ class cmdproc_Tests(wtc.WidgetTestCase): + + cmds = cmdproc.GetCommands() + self.assertEqual(len(cmds), 5) +- self.assertEqual([x.value for x in cmds], [True]*5) ++ self.assertEqual([x.value for x in list(cmds)], [True]*5) + + self.assertTrue(cmdproc.CanUndo()) + self.assertFalse(cmdproc.CanRedo()) + + cmdproc.Undo() + cmdproc.Undo() +- self.assertEqual([x.value for x in cmds], [True]*3 + [False]*2) ++ self.assertEqual([x.value for x in list(cmds)], [True]*3 + [False]*2) + + self.assertTrue(cmdproc.CanRedo()) + cmdproc.Redo() + cmdproc.Redo() +- self.assertEqual([x.value for x in cmds], [True]*5) ++ self.assertEqual([x.value for x in list(cmds)], [True]*5) + + cmdproc.Undo() + cmdproc.Undo() diff --git a/python-wxPython.changes b/python-wxPython.changes index 1c5e57d..f7cdb24 100644 --- a/python-wxPython.changes +++ b/python-wxPython.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 20 17:58:04 UTC 2025 - Markéta Machová + +- Add patch python-3.13.1.patch to fix tests with Python 3.13.1 +- Factory is not built on Python 3.10 anymore + ------------------------------------------------------------------- Sun Nov 17 13:31:39 UTC 2024 - Ben Greiner diff --git a/python-wxPython.spec b/python-wxPython.spec index c5c31d7..6c19640 100644 --- a/python-wxPython.spec +++ b/python-wxPython.spec @@ -1,7 +1,7 @@ # # spec file for package python-wxPython # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -98,6 +98,8 @@ Patch15: CVE-2024-50602-no-crash-XML_ResumeParser.patch # PATCH-FIX-OPENSUSE - Test fixes/additions: Patch112: 0001-Check-HSV-values-in-image-test.patch Patch114: wxwidgets-3.2.5.patch +# PATCH-FIX-UPSTREAM https://github.com/wxWidgets/Phoenix/pull/2678 Fix test with Python 3.13.1 +Patch115: python-3.13.1.patch # TODO: Replace deprecated setup.py calls in build.py with PEP517 without building wxWidgets into the wheel BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module devel}