diff --git a/python-humanfriendly.changes b/python-humanfriendly.changes index 1e8e1cf..a9bdc1a 100644 --- a/python-humanfriendly.changes +++ b/python-humanfriendly.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 10 13:10:47 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Wed Oct 30 02:58:39 UTC 2024 - Steve Kowalik diff --git a/python-humanfriendly.spec b/python-humanfriendly.spec index d5e018f..febd1cd 100644 --- a/python-humanfriendly.spec +++ b/python-humanfriendly.spec @@ -1,7 +1,7 @@ # # spec file for package python-humanfriendly # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,6 +24,7 @@ %define psuffix %{nil} %bcond_with test %endif +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-humanfriendly%{psuffix} Version: 10.0 @@ -41,11 +42,11 @@ Patch2: support-python-313.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: alts Requires: python -Requires(post): update-alternatives -Requires(postun): update-alternatives BuildArch: noarch %if %{with test} BuildRequires: %{python_module capturer >= 2.1} @@ -95,11 +96,8 @@ $python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hu %endif %if !%{with test} -%post -%python_install_alternative humanfriendly - -%postun -%python_uninstall_alternative humanfriendly +%pre +%python_libalternatives_reset_alternative humanfriendly %files %{python_files} %license LICENSE.txt