14
0

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

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypercorn?expand=0&rev=13
This commit is contained in:
2025-08-21 08:31:43 +00:00
committed by Git OBS Bridge
parent e0d07b5263
commit 45ada2cdf1
2 changed files with 22 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Aug 21 08:31:04 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems only
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jul 10 13:13:00 UTC 2025 - Markéta Machová <mmachova@suse.com> Thu Jul 10 13:13:00 UTC 2025 - Markéta Machová <mmachova@suse.com>

View File

@@ -16,7 +16,11 @@
# #
%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-hypercorn Name: python-hypercorn
Version: 0.17.3 Version: 0.17.3
@@ -39,15 +43,20 @@ BuildRequires: %{python_module pytest}
BuildRequires: %{python_module taskgroup if %python-base < 3.11} BuildRequires: %{python_module taskgroup if %python-base < 3.11}
BuildRequires: %{python_module trio >= 0.22.0} BuildRequires: %{python_module trio >= 0.22.0}
BuildRequires: %{python_module wsproto >= 0.14.0} BuildRequires: %{python_module wsproto >= 0.14.0}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: alts
Requires: python-h11 Requires: python-h11
Requires: python-h2 >= 3.1.0 Requires: python-h2 >= 3.1.0
Requires: python-priority Requires: python-priority
Requires: python-wsproto >= 0.14.0 Requires: python-wsproto >= 0.14.0
BuildArch: noarch BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%if %{python_version_nodots} < 311 %if %{python_version_nodots} < 311
Requires: python-exceptiongroup >= 1.1 Requires: python-exceptiongroup >= 1.1
Requires: python-taskgroup Requires: python-taskgroup
@@ -81,6 +90,12 @@ sed -i 's/--no-cov-on-fail//' pyproject.toml
# Broken with new trio # Broken with new trio
%pytest -k 'not test_startup_failure' %pytest -k 'not test_startup_failure'
%post
%python_install_alternative hypercorn
%postun
%python_uninstall_alternative hypercorn
%pre %pre
%python_libalternatives_reset_alternative hypercorn %python_libalternatives_reset_alternative hypercorn