From 6af5c18496194b96d61e08277fac7a1bb370266a371d464403d2aaa7081ac875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 10 Jul 2025 13:11:06 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-humanfriendly?expand=0&rev=44 --- python-humanfriendly.changes | 5 +++++ python-humanfriendly.spec | 14 ++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) 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