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