15
0

Accepting request 1286090 from devel:languages:python

- Convert to libalternatives

OBS-URL: https://build.opensuse.org/request/show/1286090
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-argcomplete?expand=0&rev=42
This commit is contained in:
2025-06-18 13:53:44 +00:00
committed by Git OBS Bridge
2 changed files with 14 additions and 13 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Jun 16 12:11:26 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Wed Jun 11 08:32:32 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -17,7 +17,6 @@
#
%{?sle15_python_module_pythons}
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
@@ -26,6 +25,8 @@
%define psuffix %{nil}
%bcond_with test
%endif
%bcond_without libalternatives
%{?sle15_python_module_pythons}
Name: python-argcomplete%{psuffix}
Version: 3.5.3
Release: 0
@@ -39,8 +40,11 @@ BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 67.2}
BuildRequires: %{python_module setuptools_scm >= 6.2}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: alts
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module argcomplete == %{version}}
BuildRequires: %{python_module pexpect}
@@ -48,9 +52,6 @@ BuildRequires: ca-certificates-mozilla
BuildRequires: fish
BuildRequires: zsh
%endif
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
@@ -99,15 +100,10 @@ export TERM=xterm-mono
%endif
%if %{without test}
%post
%python_install_alternative activate-global-python-argcomplete
%python_install_alternative register-python-argcomplete
%python_install_alternative python-argcomplete-check-easy-install-script
%postun
%python_uninstall_alternative activate-global-python-argcomplete
%python_uninstall_alternative register-python-argcomplete
%python_uninstall_alternative python-argcomplete-check-easy-install-script
%pre
%python_libalternatives_reset_alternative activate-global-python-argcomplete
%python_libalternatives_reset_alternative register-python-argcomplete
%python_libalternatives_reset_alternative python-argcomplete-check-easy-install-script
%files %{python_files}
%doc README.rst