forked from pool/python-fastapi
Accepting request 1300291 from devel:languages:python
- Convert to libalternatives on SLE-16-based and newer systems only OBS-URL: https://build.opensuse.org/request/show/1300291 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-fastapi?expand=0&rev=43
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 19 13:10:16 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives on SLE-16-based and newer systems only
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jul 8 13:26:46 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
Tue Jul 8 13:26:46 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
@@ -24,7 +24,11 @@
|
|||||||
%define psuffix %{nil}
|
%define psuffix %{nil}
|
||||||
%bcond_with test
|
%bcond_with test
|
||||||
%endif
|
%endif
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
%bcond_without libalternatives
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-fastapi%{psuffix}
|
Name: python-fastapi%{psuffix}
|
||||||
Version: 0.115.13
|
Version: 0.115.13
|
||||||
@@ -38,14 +42,19 @@ Patch0: support-starlette-0.47.patch
|
|||||||
BuildRequires: %{python_module hatchling}
|
BuildRequires: %{python_module hatchling}
|
||||||
BuildRequires: %{python_module pdm-backend}
|
BuildRequires: %{python_module pdm-backend}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: alts
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: alts
|
|
||||||
Requires: python-pydantic >= 1.8.2
|
Requires: python-pydantic >= 1.8.2
|
||||||
Requires: python-typing_extensions >= 4.8.0
|
Requires: python-typing_extensions >= 4.8.0
|
||||||
Requires: (python-starlette >= 0.40.0 with python-starlette < 0.48.0)
|
Requires: (python-starlette >= 0.40.0 with python-starlette < 0.48.0)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%if %{with libalternatives}
|
||||||
|
BuildRequires: alts
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
|
%endif
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
BuildRequires: %{python_module Flask >= 1.1.2}
|
BuildRequires: %{python_module Flask >= 1.1.2}
|
||||||
@@ -106,6 +115,12 @@ donttest+=" or test_openapi"
|
|||||||
%pre
|
%pre
|
||||||
%python_libalternatives_reset_alternative fastapi
|
%python_libalternatives_reset_alternative fastapi
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative fastapi
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative fastapi
|
||||||
|
|
||||||
%if !%{with test}
|
%if !%{with test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
|
Reference in New Issue
Block a user