From 103a3193bbcf911986e8eb0f8d6c10939a67f7f4f8127f6656fde0256d52c625 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Thu, 23 Oct 2025 11:41:20 +0200 Subject: [PATCH] Convert to libalternatives, bsc#1245883 --- python-avro.changes | 10 ++++++++++ python-avro.spec | 17 +++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/python-avro.changes b/python-avro.changes index f1df128..2f2f6e9 100644 --- a/python-avro.changes +++ b/python-avro.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Aug 26 12:02:47 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems only + +------------------------------------------------------------------- +Mon Jun 16 14:40:54 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Tue Aug 27 05:24:30 UTC 2024 - Steve Kowalik diff --git a/python-avro.spec b/python-avro.spec index 57a0be7..391b217 100644 --- a/python-avro.spec +++ b/python-avro.spec @@ -1,7 +1,7 @@ # # spec file for package python-avro # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,11 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-avro Version: 1.12.0 @@ -30,9 +35,14 @@ BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives -BuildArch: noarch +%endif %python_subpackages %description @@ -62,6 +72,9 @@ rm avro/test/test_ipc.py %postun %python_uninstall_alternative avro +%pre +%python_libalternatives_reset_alternative avro + %files %{python_files} %python_alternative %{_bindir}/avro %{python_sitelib}/avro