From 657a2ffdd10a63c1ae6ac1ade593e887db35450c5cc1901d130d804b7567855d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Sat, 19 Jul 2025 07:27:55 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pipx?expand=0&rev=29 --- python-pipx.changes | 5 +++++ python-pipx.spec | 14 ++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/python-pipx.changes b/python-pipx.changes index 22a3708..2b55e54 100644 --- a/python-pipx.changes +++ b/python-pipx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jul 19 07:27:33 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Mon Sep 09 06:44:16 UTC 2024 - daniel.garcia@suse.com diff --git a/python-pipx.spec b/python-pipx.spec index 33afadb..4f0e7e0 100644 --- a/python-pipx.spec +++ b/python-pipx.spec @@ -1,7 +1,7 @@ # # spec file for package python-pipx # -# Copyright (c) 2024 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 @@ -16,6 +16,7 @@ # +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-pipx Version: 1.7.1 @@ -27,10 +28,10 @@ Source: pipx-%{version}.tar.gz BuildRequires: %{python_module hatch-vcs >= 0.4} BuildRequires: %{python_module hatchling >= 1.18} BuildRequires: %{python_module pip} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires: alts Requires: python >= 3.8 Requires: python-argcomplete >= 1.9.4 Requires: python-packaging >= 20 @@ -61,11 +62,8 @@ export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %python_clone -a %{buildroot}%{_bindir}/pipx %python_expand %fdupes %{buildroot}%{$python_sitelib} -%post -%python_install_alternative pipx - -%postun -%python_uninstall_alternative pipx +%pre +%python_libalternatives_reset_alternative pipx %check # Tests require network or .pipx_tests with downloaded .whl, so not