diff --git a/python-flit.changes b/python-flit.changes index fcd128a..91c655b 100644 --- a/python-flit.changes +++ b/python-flit.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Aug 19 14:01:31 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems only + +------------------------------------------------------------------- +Tue Jul 8 13:53:24 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Fri May 2 14:35:23 UTC 2025 - Nico Krapp diff --git a/python-flit.spec b/python-flit.spec index 6f77f7a..658b35b 100644 --- a/python-flit.spec +++ b/python-flit.spec @@ -16,6 +16,11 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-flit Version: 3.12.0 @@ -37,9 +42,14 @@ Requires: python-flit-core >= %{version} Requires: python-pip Requires: python-requests Requires: python-tomli-w +BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives -BuildArch: noarch +%endif # SECTION test requirements BuildRequires: %{python_module pytest >= 2.7.3} BuildRequires: %{python_module responses} @@ -79,6 +89,9 @@ export PATH=$PWD/build/testbin/:$PATH %postun %python_uninstall_alternative flit +%pre +%python_libalternatives_reset_alternative flit + %files %{python_files} %doc README.rst %license LICENSE