From 05254769a030884edef34abd19b17d54e3282ddea2518c7e52bb3318d4d4ac3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 9 Jun 2025 12:45:38 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-odfpy?expand=0&rev=36 --- python-odfpy.changes | 5 +++++ python-odfpy.spec | 14 +++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/python-odfpy.changes b/python-odfpy.changes index 6b85c40..8f2aba5 100644 --- a/python-odfpy.changes +++ b/python-odfpy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 9 12:43:41 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Mon Jun 2 14:49:42 UTC 2025 - Markéta Machová diff --git a/python-odfpy.spec b/python-odfpy.spec index 1a81881..29c6cbb 100644 --- a/python-odfpy.spec +++ b/python-odfpy.spec @@ -19,6 +19,7 @@ # %define modname odfpy %define binaries csv2ods mailodf odf2mht odf2xhtml odf2xml odfimgimport odflint odfmeta odfoutline odfuserfield xml2odf +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-%{modname} Version: 1.4.2 @@ -33,11 +34,11 @@ BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: alts Requires: python-defusedxml -Requires(post): alts -Requires(postun): alts BuildArch: noarch %python_subpackages @@ -86,14 +87,9 @@ done %check %pytest -%post +%pre for b in %{binaries}; do - %python_install_alternative $b $b.1 -done - -%postun -for b in %{binaries}; do - %python_uninstall_alternative $b + %python_libalternatives_reset_alternative $b done %files %{python_files}