From bcad03e2b4e3b70d42a3a83b317dd9dd60a7d4fed9e1512e657c19bbc4838ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 11 Aug 2025 14:02:07 +0000 Subject: [PATCH] - Make the libalternatives transition conditional OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bottle?expand=0&rev=67 --- python-bottle.changes | 5 +++++ python-bottle.spec | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/python-bottle.changes b/python-bottle.changes index be408cb..3186c5b 100644 --- a/python-bottle.changes +++ b/python-bottle.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 11 14:01:21 UTC 2025 - Markéta Machová + +- Make the libalternatives transition conditional + ------------------------------------------------------------------- Tue Jul 15 06:52:35 UTC 2025 - Daniel Garcia diff --git a/python-bottle.spec b/python-bottle.spec index afb02b0..2d4bd31 100644 --- a/python-bottle.spec +++ b/python-bottle.spec @@ -16,7 +16,11 @@ # +%if 0%{?suse_version} > 1500 %bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-bottle Version: 0.13.4 @@ -29,10 +33,15 @@ Source1: http://bottlepy.org/docs/0.12/bottle-docs.pdf BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} -BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros +%if %{with libalternatives} +BuildRequires: alts Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif BuildArch: noarch %python_subpackages @@ -80,6 +89,13 @@ rm -rf %{buildroot}%{_bindir}/bottle.py %python_libalternatives_reset_alternative bottle.py %python_libalternatives_reset_alternative bottle +%post +%python_install_alternative bottle + +%postun +%python_uninstall_alternative bottle.py +%python_uninstall_alternative bottle + %files %{python_files} %license LICENSE %doc README.rst