From f847df764064fd9d485db7684cbcb145f758971c916f251dfa2f97bd1aaf11f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 16 Jun 2025 14:27:01 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Automat?expand=0&rev=27 --- python-Automat.changes | 5 +++++ python-Automat.spec | 15 ++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/python-Automat.changes b/python-Automat.changes index c42f953..032f42e 100644 --- a/python-Automat.changes +++ b/python-Automat.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 16 14:24:41 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Sun Mar 30 08:26:56 UTC 2025 - Dirk Müller diff --git a/python-Automat.spec b/python-Automat.spec index 1fc37fd..4383022 100644 --- a/python-Automat.spec +++ b/python-Automat.spec @@ -24,7 +24,7 @@ %define psuffix %{nil} %bcond_with test %endif - +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-Automat%{psuffix} Version: 24.8.1 @@ -32,16 +32,16 @@ Release: 0 Summary: Self-service finite-state machines for the programmer on the go License: MIT URL: https://github.com/glyph/automat -Source: https://files.pythonhosted.org/packages/source/A/Automat/automat-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/a/automat/automat-%{version}.tar.gz 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 +Requires: alts Requires: python-attrs >= 19.2.0 -Requires(post): update-alternatives -Requires(preun): update-alternatives Suggests: python-Twisted >= 16.1.1 Suggests: python-graphviz > 0.5.1 BuildArch: noarch @@ -76,11 +76,8 @@ automata (particularly deterministic finite-state transducers). %endif %if !%{with test} -%post -%python_install_alternative automat-visualize - -%postun -%python_uninstall_alternative automat-visualize +%pre +%python_libalternatives_reset_alternative automat-visualize %files %{python_files} %license LICENSE