From 7c238c10bfc1a5823b39c7d5610ff09341672ab2cc68320b5d7898865d7f3971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 17 Jun 2025 09:04:25 +0000 Subject: [PATCH 1/2] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bpython?expand=0&rev=38 --- python-bpython.changes | 5 +++++ python-bpython.spec | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/python-bpython.changes b/python-bpython.changes index a5b527f..d2c990e 100644 --- a/python-bpython.changes +++ b/python-bpython.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 17 09:03:42 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Tue Jan 21 12:13:55 UTC 2025 - John Paul Adrian Glaubitz diff --git a/python-bpython.spec b/python-bpython.spec index c1205aa..de2170f 100644 --- a/python-bpython.spec +++ b/python-bpython.spec @@ -17,6 +17,7 @@ %bcond_without test +%bcond_without libalternatives Name: python-bpython Version: 0.25 Release: 0 @@ -29,18 +30,18 @@ BuildRequires: %{python_module Sphinx} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: fdupes BuildRequires: hicolor-icon-theme BuildRequires: python-rpm-macros BuildRequires: update-desktop-files Requires: %{name}-common = %{version} +Requires: alts Requires: python-curtsies >= 0.4 Requires: python-greenlet Requires: python-pygments Requires: python-pyxdg Requires: python-requests -Requires(post): update-alternatives -Requires(postun): update-alternatives Recommends: python-cwcwidth Recommends: python-jedi Recommends: python-ndg-httpsclient @@ -131,11 +132,8 @@ rm %{buildroot}%{_datadir}/applications/org.bpython-interpreter.bpython.desktop %pyunittest discover -v %endif -%post -%{python_install_alternative bpython bpython-urwid bpdb bpython.1%{ext_man} bpython-config.5%{ext_man}} - -%postun -%python_uninstall_alternative bpython +%pre +%python_libalternatives_reset_alternative bpython %files %{python_files} %license LICENSE From d7f4ae90287090f0067d37625892b687eb38b01f7a22531eee52d5cb8d445a35 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Wed, 18 Jun 2025 08:56:07 +0000 Subject: [PATCH 2/2] - Fix libalternatives bpython-config man page OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bpython?expand=0&rev=39 --- python-bpython.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python-bpython.spec b/python-bpython.spec index de2170f..af50dfb 100644 --- a/python-bpython.spec +++ b/python-bpython.spec @@ -149,6 +149,12 @@ rm %{buildroot}%{_datadir}/applications/org.bpython-interpreter.bpython.desktop %python_alternative %{_bindir}/bpdb %python_alternative %{_mandir}/man1/bpython.1%{ext_man} %python_alternative %{_mandir}/man5/bpython-config.5%{ext_man} +# Needed because bpython-config doesn't have a binary, it's just a man page file. +%if %{with libalternatives} +%dir %{_datadir}/libalternatives/bpython-config +%{_datadir}/libalternatives/bpython-config/*%{python_version_nodots}.conf +%endif + %dir %{_datadir}/metainfo/ %{_datadir}/metainfo/org.bpython-interpreter.bpython-%{python_bin_suffix}.metainfo.xml %dir %{_datadir}/applications/