From 727da7848500db3ef2fb7561158bc172dd4ea6ffec32983e1a9b01a49e91362e Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 21 Oct 2025 13:21:12 +0000 Subject: [PATCH] Accepting request 1312045 from home:mcalabkova:branches:X11:wxWidgets - Convert to libalternatives on SLE-16-based and newer systems OBS-URL: https://build.opensuse.org/request/show/1312045 OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=73 --- python-wxPython.changes | 5 +++++ python-wxPython.spec | 20 ++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/python-wxPython.changes b/python-wxPython.changes index 98809ab..23a114f 100644 --- a/python-wxPython.changes +++ b/python-wxPython.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 17 12:45:18 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems + ------------------------------------------------------------------- Wed Jul 16 06:22:06 UTC 2025 - Torsten Gruner diff --git a/python-wxPython.spec b/python-wxPython.spec index 75cbea0..79a3d61 100644 --- a/python-wxPython.spec +++ b/python-wxPython.spec @@ -1,7 +1,7 @@ # # spec file for package python-wxPython # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -80,6 +80,11 @@ ExclusiveArch: donotbuild %define python_provides %{expand:%%%{flavor}_provides} %endif %endif +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif Name: %{pprefix}-wxPython Version: 4.2.3 @@ -107,8 +112,8 @@ BuildRequires: %{python_module base >= 3.9} BuildRequires: %{python_module devel} BuildRequires: %{python_module requests} BuildRequires: %{python_module setuptools} -BuildRequires: gcc%{?gccver}-c++ BuildRequires: fdupes +BuildRequires: gcc%{?gccver}-c++ BuildRequires: pkgconfig BuildRequires: python-rpm-macros %if %{with syswx} @@ -161,6 +166,13 @@ BuildRequires: google-opensans-fonts BuildRequires: xorg-x11-server BuildRequires: pkgconfig(cppunit) %endif +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif %description Phoenix is a reimplementation of wxPython. Like the "classic" @@ -254,6 +266,7 @@ fi %python_clone -a %{buildroot}%{_bindir}/wxdemo %python_clone -a %{buildroot}%{_bindir}/wxdocs %python_clone -a %{buildroot}%{_bindir}/wxget +%python_group_libalternatives pywxrc helpviewer img2png img2py img2xpm pycrust pyshell pyslices pyslicesshell wxdemo wxdocs wxget %if %{without syswx} %find_lang wxstd @@ -291,6 +304,9 @@ mv wx wx_temp mv wx_temp wx %endif +%pre +%python_libalternatives_reset_alternative pywxrc + %post %python_install_alternative pywxrc helpviewer img2png img2py img2xpm pycrust pyshell pyslices pyslicesshell wxdemo wxdocs wxget