From 71f4d194d197752a61d806e005e84a01758049c8dff045fc823bc85ecb5a8d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 25 Aug 2025 14:26:09 +0000 Subject: [PATCH] - Convert to libalternatives on SLE-16-based and newer systems OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typer?expand=0&rev=51 --- python-typer.changes | 5 +++++ python-typer.spec | 21 +++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/python-typer.changes b/python-typer.changes index 9d427a0..4233ff5 100644 --- a/python-typer.changes +++ b/python-typer.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 25 14:25:37 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems + ------------------------------------------------------------------- Tue Aug 19 20:15:13 UTC 2025 - Matthias Bach diff --git a/python-typer.spec b/python-typer.spec index e2cab0c..0075dca 100644 --- a/python-typer.spec +++ b/python-typer.spec @@ -1,7 +1,7 @@ # # spec file for package python-typer # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # Copyright (c) 2021 Matthias Bach # # All modifications and additions to the file contributed by third parties @@ -18,6 +18,11 @@ %define plainpython python +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-typer Version: 0.16.1 @@ -41,13 +46,18 @@ Requires: %{plainpython}(abi) = %{python_version} Requires: python-click Requires: python-rich Requires: python-shellingham -Requires: python-typer-slim >= %version +Requires: python-typer-slim >= %{version} Requires: python-typing_extensions -Requires(post): update-alternatives -Requires(postun): update-alternatives # both packages provide /usr/bin/typer Conflicts: erlang BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif %python_subpackages %description @@ -90,6 +100,9 @@ as those that do. %postun %python_uninstall_alternative typer +%pre +%python_libalternatives_reset_alternative typer + %files %{python_files} %doc README.md %license LICENSE