From aacd4fe2e93a188d6ad2f68171c98b5ba9481b7fd24945f59f3063bdbb55db8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 10 Jul 2025 13:23:07 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-invoke?expand=0&rev=49 --- python-invoke.changes | 5 +++++ python-invoke.spec | 18 ++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/python-invoke.changes b/python-invoke.changes index c57d1e6..c7eb4cf 100644 --- a/python-invoke.changes +++ b/python-invoke.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 10 13:21:17 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Thu Oct 19 09:31:17 UTC 2023 - Ondřej Súkup diff --git a/python-invoke.spec b/python-invoke.spec index 6e45af8..9affde3 100644 --- a/python-invoke.spec +++ b/python-invoke.spec @@ -1,7 +1,7 @@ # -# spec file +# spec file for package python-invoke # -# Copyright (c) 2023 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 @@ -24,7 +24,7 @@ %define psuffix %{nil} %bcond_with test %endif - +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-invoke%{psuffix} Version: 2.2.0 @@ -39,13 +39,13 @@ Patch0: remove-icecream.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools > 56} BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: alts Requires: python-PyYAML Requires: python-fluidity-sm Requires: python-lexicon -Requires(post): update-alternatives -Requires(postun):update-alternatives BuildArch: noarch %if %{with test} BuildRequires: %{python_module PyYAML} @@ -78,6 +78,7 @@ rm -fr invoke/vendor/* %python_clone -a %{buildroot}%{_bindir}/inv %python_clone -a %{buildroot}%{_bindir}/invoke +%python_group_libalternatives inv invoke %endif %if %{with test} @@ -95,11 +96,8 @@ skiptests+=" or may_be_overridden_when_pty_True or uses_execve_for_pty_True or s %pytest -s -k "not ($skiptests)" tests %endif -%post -%{python_install_alternative inv invoke} - -%postun -%python_uninstall_alternative inv +%pre +%python_libalternatives_reset_alternative inv %if !%{with test} %files %{python_files}