diff --git a/python-coloredlogs.changes b/python-coloredlogs.changes index a618acd..86fc792 100644 --- a/python-coloredlogs.changes +++ b/python-coloredlogs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 12 12:54:10 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems + ------------------------------------------------------------------- Wed Oct 30 02:59:26 UTC 2024 - Steve Kowalik diff --git a/python-coloredlogs.spec b/python-coloredlogs.spec index d087b04..5c2a1a3 100644 --- a/python-coloredlogs.spec +++ b/python-coloredlogs.spec @@ -1,7 +1,7 @@ # # spec file for package python-coloredlogs # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # Copyright (c) 2016, Martin Hauke # # All modifications and additions to the file contributed by third parties @@ -17,6 +17,11 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-coloredlogs Version: 15.0.1 @@ -41,9 +46,14 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-capturer >= 2.4 Requires: python-humanfriendly >= 9.1 +Recommends: python-verboselogs >= 1.7 +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives -Recommends: python-verboselogs >= 1.7 +%endif BuildArch: noarch %python_subpackages @@ -67,6 +77,9 @@ using Colorama. %python_clone -a %{buildroot}%{_bindir}/coloredlogs %python_expand %fdupes %{buildroot}%{$python_sitelib} +%pre +%python_libalternatives_reset_alternative coloredlogs + %post %python_install_alternative coloredlogs