From 6e5dd3a8984b43a2fa30ac3e8047addadc1fe9d90eb28563918bf9350d0744cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 16 Jun 2025 13:49:44 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-argparse-manpage?expand=0&rev=39 --- python-argparse-manpage.changes | 5 +++++ python-argparse-manpage.spec | 16 +++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/python-argparse-manpage.changes b/python-argparse-manpage.changes index 17f96f2..88ab565 100644 --- a/python-argparse-manpage.changes +++ b/python-argparse-manpage.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 16 13:49:16 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Tue Apr 1 03:51:22 UTC 2025 - Steve Kowalik diff --git a/python-argparse-manpage.spec b/python-argparse-manpage.spec index a3608d2..1996af7 100644 --- a/python-argparse-manpage.spec +++ b/python-argparse-manpage.spec @@ -17,6 +17,7 @@ %define mod_name argparse-manpage +%bcond_without libalternatives Name: python-argparse-manpage Version: 4.6 Release: 0 @@ -24,19 +25,19 @@ Summary: Tool for automatic manual page building from a Python ArgumentPa License: Apache-2.0 URL: https://github.com/praiskup/argparse-manpage Source: https://github.com/praiskup/argparse-manpage/archive/v%{version}.tar.gz -BuildArch: noarch BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools-wheel} BuildRequires: %{python_module setuptools} +BuildRequires: alts BuildRequires: ca-certificates BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: alts +BuildArch: noarch %if 0%{python_version_nodots} < 311 Requires: python-tomli %endif -Requires(post): update-alternatives -Requires(postun): update-alternatives %python_subpackages %description @@ -62,14 +63,11 @@ support for (deprecated) optparse objects, too. %check export PIP_NO_INDEX=1 -export PIP_FIND_LINKS=$(ls -1 /usr/lib/python3.*/wheels | head -n 1) +export PIP_FIND_LINKS=$(ls -1 %{_prefix}/lib/python3.*/wheels | head -n 1) %pytest -k 'not test_old_example_file_name' -%post -%{python_install_alternative argparse-manpage argparse-manpage.1} - -%postun -%python_uninstall_alternative argparse-manpage +%pre +%python_libalternatives_reset_alternative argparse-manpage %files %{python_files} %doc README.md