From 563f41a6af3c19f4e4f4afd0cd6df6b4e064f481f897b1f3bfcb38362ae07d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 11 Aug 2025 13:38:32 +0000 Subject: [PATCH] - Make the libalternatives transition conditional OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Automat?expand=0&rev=31 --- python-Automat.changes | 5 +++++ python-Automat.spec | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/python-Automat.changes b/python-Automat.changes index 7e5a6a4..8532b52 100644 --- a/python-Automat.changes +++ b/python-Automat.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 11 13:37:41 UTC 2025 - Markéta Machová + +- Make the libalternatives transition conditional + ------------------------------------------------------------------- Sat Jul 12 11:39:20 UTC 2025 - Dirk Müller diff --git a/python-Automat.spec b/python-Automat.spec index 681e8b1..9f5a9d6 100644 --- a/python-Automat.spec +++ b/python-Automat.spec @@ -24,7 +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-Automat%{psuffix} Version: 25.4.16 @@ -37,10 +41,15 @@ BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} -BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros +%if %{with libalternatives} +BuildRequires: alts Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif Requires: python-attrs >= 19.2.0 Suggests: python-Twisted >= 16.1.1 Suggests: python-graphviz > 0.5.1 @@ -79,6 +88,12 @@ automata (particularly deterministic finite-state transducers). %pre %python_libalternatives_reset_alternative automat-visualize +%post +%python_install_alternative automat-visualize + +%postun +%python_uninstall_alternative automat-visualize + %files %{python_files} %license LICENSE %doc README.md