From a732f9cecb6e94fb00fa5c71c27945333f698e57cc77bf29a4955fc12de1d2c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 8 Jul 2025 13:27:17 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fastapi?expand=0&rev=95 --- python-fastapi.changes | 5 +++++ python-fastapi.spec | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/python-fastapi.changes b/python-fastapi.changes index 312f1a4..e7334ec 100644 --- a/python-fastapi.changes +++ b/python-fastapi.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 8 13:26:46 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Fri Jun 27 00:44:09 UTC 2025 - Steve Kowalik diff --git a/python-fastapi.spec b/python-fastapi.spec index 09b9529..443b30c 100644 --- a/python-fastapi.spec +++ b/python-fastapi.spec @@ -24,6 +24,7 @@ %define psuffix %{nil} %bcond_with test %endif +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-fastapi%{psuffix} Version: 0.115.13 @@ -37,13 +38,13 @@ Patch0: support-starlette-0.47.patch BuildRequires: %{python_module hatchling} BuildRequires: %{python_module pdm-backend} BuildRequires: %{python_module pip} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: alts Requires: python-pydantic >= 1.8.2 Requires: python-typing_extensions >= 4.8.0 Requires: (python-starlette >= 0.40.0 with python-starlette < 0.48.0) -Requires(post): update-alternatives -Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements %if %{with test} @@ -102,11 +103,8 @@ donttest+=" or test_openapi" %pytest -W ignore::DeprecationWarning -W ignore::PendingDeprecationWarning -W ignore::ResourceWarning -k "not ($donttest)" tests %endif -%post -%python_install_alternative fastapi - -%postun -%python_uninstall_alternative fastapi +%pre +%python_libalternatives_reset_alternative fastapi %if !%{with test} %files %{python_files}