4 Commits

2 changed files with 29 additions and 6 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
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>
- Convert to libalternatives
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Oct 19 09:31:17 UTC 2023 - Ondřej Súkup <mimi.vx@gmail.com> Thu Oct 19 09:31:17 UTC 2023 - Ondřej Súkup <mimi.vx@gmail.com>

View File

@@ -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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -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
%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
@@ -44,9 +48,14 @@ BuildRequires: python-rpm-macros
Requires: python-PyYAML Requires: python-PyYAML
Requires: python-fluidity-sm Requires: python-fluidity-sm
Requires: python-lexicon Requires: python-lexicon
BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun): update-alternatives Requires(postun): update-alternatives
BuildArch: noarch %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}
@@ -78,6 +87,7 @@ rm -fr invoke/vendor/*
%python_clone -a %{buildroot}%{_bindir}/inv %python_clone -a %{buildroot}%{_bindir}/inv
%python_clone -a %{buildroot}%{_bindir}/invoke %python_clone -a %{buildroot}%{_bindir}/invoke
%python_group_libalternatives inv invoke
%endif %endif
%if %{with test} %if %{with test}
@@ -96,11 +106,14 @@ skiptests+=" or may_be_overridden_when_pty_True or uses_execve_for_pty_True or s
%endif %endif
%post %post
%{python_install_alternative inv invoke} %python_install_alternative inv invoke
%postun %postun
%python_uninstall_alternative inv %python_uninstall_alternative inv
%pre
%python_libalternatives_reset_alternative inv
%if !%{with test} %if !%{with test}
%files %{python_files} %files %{python_files}
%license LICENSE %license LICENSE