From 19b1dd1f563dbc33d466ac43437611a57c5a6143fc0f725d26ba48aa79f0d386 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Thu, 23 Oct 2025 11:44:09 +0200 Subject: [PATCH] Convert to libalternatives, bsc#1245883 --- python-keyring.changes | 10 ++++++++++ python-keyring.spec | 18 +++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/python-keyring.changes b/python-keyring.changes index 9031d5a..384b409 100644 --- a/python-keyring.changes +++ b/python-keyring.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Aug 21 09:28:37 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems only + +------------------------------------------------------------------- +Fri Jul 11 10:42:52 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Tue May 14 08:11:26 UTC 2024 - Dirk Müller diff --git a/python-keyring.spec b/python-keyring.spec index 9f2cb71..3c15f3a 100644 --- a/python-keyring.spec +++ b/python-keyring.spec @@ -1,7 +1,7 @@ # # spec file for package python-keyring # -# 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,11 @@ %define psuffix %{nil} %bcond_with test %endif +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-keyring%{psuffix} Version: 25.2.1 @@ -44,10 +49,14 @@ Requires: python-jaraco.classes Requires: python-jaraco.context Requires: python-jaraco.functools Requires: python-jeepney >= 0.4.2 +BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives -BuildArch: noarch - +%endif %if 0%{python_version_nodots} < 310 Requires: python-importlib-resources %endif @@ -94,6 +103,9 @@ sed -i '/^#!/d' keyring/cli.py %postun %python_uninstall_alternative keyring +%pre +%python_libalternatives_reset_alternative keyring + %files %{python_files} %doc README.rst NEWS.rst %license LICENSE