14
0
forked from pool/python-invoke

Accepting request 1300724 from devel:languages:python

- Convert to libalternatives on SLE-16-based and newer systems only

OBS-URL: https://build.opensuse.org/request/show/1300724
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-invoke?expand=0&rev=21
This commit is contained in:
2025-08-22 15:46:54 +00:00
committed by Git OBS Bridge
2 changed files with 22 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Aug 21 08:47:08 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems only
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jul 10 13:21:17 UTC 2025 - Markéta Machová <mmachova@suse.com> Thu Jul 10 13:21:17 UTC 2025 - Markéta Machová <mmachova@suse.com>

View File

@@ -24,7 +24,11 @@
%define psuffix %{nil} %define psuffix %{nil}
%bcond_with test %bcond_with test
%endif %endif
%if 0%{?suse_version} > 1500
%bcond_without libalternatives %bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-invoke%{psuffix} Name: python-invoke%{psuffix}
Version: 2.2.0 Version: 2.2.0
@@ -39,14 +43,19 @@ Patch0: remove-icecream.patch
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools > 56} BuildRequires: %{python_module setuptools > 56}
BuildRequires: %{python_module wheel} BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: alts
Requires: python-PyYAML Requires: python-PyYAML
Requires: python-fluidity-sm Requires: python-fluidity-sm
Requires: python-lexicon Requires: python-lexicon
BuildArch: noarch BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%if %{with test} %if %{with test}
BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module fluidity-sm} BuildRequires: %{python_module fluidity-sm}
@@ -96,6 +105,12 @@ skiptests+=" or may_be_overridden_when_pty_True or uses_execve_for_pty_True or s
%pytest -s -k "not ($skiptests)" tests %pytest -s -k "not ($skiptests)" tests
%endif %endif
%post
%python_install_alternative inv invoke
%postun
%python_uninstall_alternative inv
%pre %pre
%python_libalternatives_reset_alternative inv %python_libalternatives_reset_alternative inv