From 6623755817501c1c3c49cd4f51cab709e6343a38825b7e32988492615df61845 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Thu, 23 Oct 2025 11:41:31 +0200 Subject: [PATCH] Convert to libalternatives, bsc#1245883 --- python-CacheControl.changes | 10 ++++++++++ python-CacheControl.spec | 17 +++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/python-CacheControl.changes b/python-CacheControl.changes index 8796f72..025b811 100644 --- a/python-CacheControl.changes +++ b/python-CacheControl.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Aug 14 12:53:25 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems only + +------------------------------------------------------------------- +Tue Jul 8 12:38:22 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Tue May 6 08:53:17 UTC 2025 - John Paul Adrian Glaubitz diff --git a/python-CacheControl.spec b/python-CacheControl.spec index 2594b37..ff340b2 100644 --- a/python-CacheControl.spec +++ b/python-CacheControl.spec @@ -16,6 +16,11 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-CacheControl Version: 0.14.3 @@ -33,11 +38,16 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-msgpack >= 0.5.2 Requires: python-requests >= 2.16.0 +Recommends: python-filelock >= 3.8.0 Provides: python-cachecontrol = %{version}-%{release} +BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives -Recommends: python-filelock >= 3.8.0 -BuildArch: noarch +%endif # SECTION test requirements BuildRequires: %{python_module CherryPy} BuildRequires: %{python_module filelock >= 3.8.0} @@ -70,6 +80,9 @@ requests session object. # test_file_cache_recognizes_consumed_file_handle uses httpbin.org directly %pytest -v -k 'not test_file_cache_recognizes_consumed_file_handle' +%pre +%python_libalternatives_reset_alternative doesitcache + %post %python_install_alternative doesitcache