From 62fb66a27ba9d869f9355b5c560e4ba23ec68847310265129e12948ad0242c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 19 Aug 2025 12:25:48 +0000 Subject: [PATCH] - Convert to libalternatives on SLE-16-based and newer systems OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-falcon?expand=0&rev=67 --- python-falcon.changes | 5 +++++ python-falcon.spec | 19 +++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/python-falcon.changes b/python-falcon.changes index e8ceeb4..f33f789 100644 --- a/python-falcon.changes +++ b/python-falcon.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 19 12:18:37 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems + ------------------------------------------------------------------- Tue Jul 8 13:19:46 UTC 2025 - Markéta Machová diff --git a/python-falcon.spec b/python-falcon.spec index 4c5a400..562dd04 100644 --- a/python-falcon.spec +++ b/python-falcon.spec @@ -21,7 +21,11 @@ %else %bcond_with doc %endif +%if 0%{?suse_version} > 1500 %bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-falcon Version: 4.0.2 @@ -45,10 +49,15 @@ BuildRequires: %{python_module sphinx-tabs} BuildRequires: %{python_module sphinxcontrib-copybutton} BuildRequires: %{python_module websockets} 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 Suggests: %{name}-doc BuildArch: noarch # TODO: Cython support @@ -110,7 +119,7 @@ popd %python_clone -a %{buildroot}%{_bindir}/falcon-bench %python_clone -a %{buildroot}%{_bindir}/falcon-inspect-app %python_clone -a %{buildroot}%{_bindir}/falcon-print-routes -%python_group_libalternatives falcon-bench falcon-inspect-app falcon-print-routes +%{python_group_libalternatives} falcon-bench falcon-inspect-app falcon-print-routes %python_expand %fdupes %{buildroot}%{$python_sitelib} %if %{with doc} @@ -126,6 +135,12 @@ export LANG=en_US.UTF8 %pre %python_libalternatives_reset_alternative falcon-bench +%post +%python_install_alternative falcon-bench falcon-inspect-app falcon-print-routes + +%postun +%python_uninstall_alternative falcon-bench + %files %{python_files} %doc README.rst %license LICENSE