14
0

Accepting request 1301305 from devel:languages:python

- Convert to libalternatives on SLE-16-based and newer systems

OBS-URL: https://build.opensuse.org/request/show/1301305
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-uvicorn?expand=0&rev=21
This commit is contained in:
2025-08-26 12:56:24 +00:00
committed by Git OBS Bridge
2 changed files with 22 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Aug 25 14:27:42 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems
------------------------------------------------------------------- -------------------------------------------------------------------
Thu May 1 06:28:46 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com> Thu May 1 06:28:46 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-uvicorn # spec file for package python-uvicorn
# #
# Copyright (c) 2025 SUSE LLC # Copyright (c) 2025 SUSE LLC and contributors
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,11 @@
# #
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-uvicorn Name: python-uvicorn
Version: 0.34.2 Version: 0.34.2
@@ -38,9 +43,14 @@ Requires: python-h11 >= 0.8.0
Recommends: python-PyYAML >= 5.1 Recommends: python-PyYAML >= 5.1
Recommends: python-httptools >= 0.4.0 Recommends: python-httptools >= 0.4.0
Recommends: python-websockets >= 8.0 Recommends: python-websockets >= 8.0
BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun): update-alternatives Requires(postun): update-alternatives
BuildArch: noarch %endif
# SECTION test requirements # SECTION test requirements
BuildRequires: %{python_module PyYAML >= 5.1} BuildRequires: %{python_module PyYAML >= 5.1}
BuildRequires: %{python_module click >= 7.0} BuildRequires: %{python_module click >= 7.0}
@@ -54,11 +64,11 @@ BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dotenv} BuildRequires: %{python_module python-dotenv}
BuildRequires: %{python_module requests} BuildRequires: %{python_module requests}
BuildRequires: %{python_module trustme} BuildRequires: %{python_module trustme}
BuildRequires: %{python_module websockets >= 10.4}
BuildRequires: %{python_module wsproto >= 1.2.0}
%if 0%{?suse_version} > 1500 %if 0%{?suse_version} > 1500
BuildRequires: %{python_module uvloop >= 0.14.0} BuildRequires: %{python_module uvloop >= 0.14.0}
%endif %endif
BuildRequires: %{python_module websockets >= 10.4}
BuildRequires: %{python_module wsproto >= 1.2.0}
# We don't want watchfiles in Ring1 # We don't want watchfiles in Ring1
#BuildRequires: #{python_module watchfiles >= 0.13} #BuildRequires: #{python_module watchfiles >= 0.13}
# /SECTION # /SECTION
@@ -85,6 +95,9 @@ It supports HTTP/1.1 and WebSockets only.
%postun %postun
%python_uninstall_alternative uvicorn %python_uninstall_alternative uvicorn
%pre
%python_libalternatives_reset_alternative uvicorn
%check %check
# Required for reporting bugs # Required for reporting bugs
%python_exec -m uvicorn --version %python_exec -m uvicorn --version