From eb470ecfc7369972207bbccf17a9858cbf2e105bd2bd4d7665e0045e737213f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 16 Jun 2025 12:21:10 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ansi2html?expand=0&rev=18 --- python-ansi2html.changes | 5 +++++ python-ansi2html.spec | 14 ++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/python-ansi2html.changes b/python-ansi2html.changes index 5d5e6cd..49e0779 100644 --- a/python-ansi2html.changes +++ b/python-ansi2html.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 16 12:20:51 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Sun Jun 23 07:43:43 UTC 2024 - Johannes Kastl diff --git a/python-ansi2html.spec b/python-ansi2html.spec index a69fb97..d2cb8eb 100644 --- a/python-ansi2html.spec +++ b/python-ansi2html.spec @@ -1,7 +1,7 @@ # # spec file for package python-ansi2html # -# 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 @@ -16,6 +16,7 @@ # +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-ansi2html Version: 1.9.2 @@ -29,10 +30,10 @@ 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(post): update-alternatives -Requires(postun): update-alternatives +Requires: alts BuildArch: noarch %python_subpackages @@ -61,11 +62,8 @@ sed -i 's:from mock:from unittest.mock:' tests/test_ansi2html.py # but it runs just ansi2html --version %pytest -k 'not test_command_script' -%post -%python_install_alternative ansi2html - -%postun -%python_uninstall_alternative ansi2html +%pre +%python_libalternatives_reset_alternative ansi2html %files %{python_files} %license LICENSE