2020-10-13 09:32:40 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-uvicorn
|
|
|
|
#
|
2023-02-16 18:05:55 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2020-10-13 09:32:40 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-uvicorn
|
2023-02-16 18:05:55 +00:00
|
|
|
Version: 0.20.0
|
2020-10-13 09:32:40 +00:00
|
|
|
Release: 0
|
2020-10-13 09:53:07 +00:00
|
|
|
Summary: An Asynchronous Server Gateway Interface server
|
2020-10-13 09:32:40 +00:00
|
|
|
License: BSD-3-Clause
|
|
|
|
URL: https://github.com/encode/uvicorn
|
|
|
|
Source: https://github.com/encode/uvicorn/archive/%{version}.tar.gz#/uvicorn-%{version}.tar.gz
|
2022-07-19 09:33:14 +00:00
|
|
|
BuildRequires: %{python_module base >= 3.7}
|
2023-02-16 18:05:55 +00:00
|
|
|
BuildRequires: %{python_module hatchling}
|
|
|
|
BuildRequires: %{python_module pip}
|
2020-10-13 09:32:40 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-02-16 18:05:55 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2020-10-13 09:32:40 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
Requires: python-click >= 7.0
|
|
|
|
Requires: python-h11 >= 0.8.0
|
2022-07-19 09:33:14 +00:00
|
|
|
%if 0%{python_version_nodots} < 38
|
2020-10-13 09:32:40 +00:00
|
|
|
Requires: python-typing_extensions
|
2022-07-19 09:33:14 +00:00
|
|
|
%endif
|
2020-11-30 16:11:56 +00:00
|
|
|
Recommends: python-PyYAML >= 5.1
|
2022-07-19 09:33:14 +00:00
|
|
|
Recommends: python-httptools >= 0.4.0
|
|
|
|
Recommends: python-websockets >= 8.0
|
2020-10-13 09:32:40 +00:00
|
|
|
Suggests: python-uvloop >= 0.14.0
|
2022-07-19 09:33:14 +00:00
|
|
|
Suggests: python-watchfiles >= 0.13
|
2023-02-16 18:05:55 +00:00
|
|
|
Suggests: python-wsproto >= 1.2.0
|
2020-10-13 09:32:40 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-09-17 13:22:19 +00:00
|
|
|
Requires(postun):update-alternatives
|
2020-10-13 09:32:40 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
# SECTION test requirements
|
2020-11-30 16:11:56 +00:00
|
|
|
BuildRequires: %{python_module PyYAML >= 5.1}
|
2022-01-24 13:29:59 +00:00
|
|
|
BuildRequires: %{python_module asgiref >= 3.4}
|
2020-10-13 09:32:40 +00:00
|
|
|
BuildRequires: %{python_module click >= 7.0}
|
|
|
|
BuildRequires: %{python_module h11 >= 0.8.0}
|
2022-07-19 09:33:14 +00:00
|
|
|
BuildRequires: %{python_module httptools >= 0.4.0}
|
2022-01-24 13:29:59 +00:00
|
|
|
BuildRequires: %{python_module httpx >= 0.18}
|
|
|
|
BuildRequires: %{python_module pytest-asyncio}
|
2020-10-13 09:32:40 +00:00
|
|
|
BuildRequires: %{python_module pytest-mock}
|
2020-10-13 09:53:07 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2022-01-24 13:29:59 +00:00
|
|
|
BuildRequires: %{python_module python-dotenv}
|
2020-10-13 09:32:40 +00:00
|
|
|
BuildRequires: %{python_module requests}
|
2020-11-30 16:11:56 +00:00
|
|
|
BuildRequires: %{python_module trustme}
|
2022-07-19 09:33:14 +00:00
|
|
|
BuildRequires: %{python_module typing_extensions if %python-base < 3.8}
|
2023-03-16 08:23:35 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
2020-10-13 09:32:40 +00:00
|
|
|
BuildRequires: %{python_module uvloop >= 0.14.0}
|
2023-03-16 08:23:35 +00:00
|
|
|
%endif
|
2020-10-13 09:32:40 +00:00
|
|
|
BuildRequires: %{python_module websockets >= 8.0}
|
2023-02-16 18:05:55 +00:00
|
|
|
BuildRequires: %{python_module wsproto >= 1.2.0}
|
2022-07-20 10:11:36 +00:00
|
|
|
# We don't want watchfiles in Ring1
|
|
|
|
#BuildRequires: #{python_module watchfiles >= 0.13}
|
2020-10-13 09:32:40 +00:00
|
|
|
# /SECTION
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2020-10-13 09:53:07 +00:00
|
|
|
Uvicorn is an ASGI server implementation, using uvloop and httptools.
|
|
|
|
It supports HTTP/1.1 and WebSockets only.
|
2020-10-13 09:32:40 +00:00
|
|
|
|
|
|
|
%prep
|
2020-10-13 09:53:07 +00:00
|
|
|
%autosetup -p1 -n uvicorn-%{version}
|
2020-10-13 09:32:40 +00:00
|
|
|
rm setup.cfg
|
|
|
|
|
|
|
|
%build
|
2023-02-16 18:05:55 +00:00
|
|
|
%pyproject_wheel
|
2020-10-13 09:32:40 +00:00
|
|
|
|
|
|
|
%install
|
2023-02-16 18:05:55 +00:00
|
|
|
%pyproject_install
|
2020-10-13 09:32:40 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/uvicorn
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative uvicorn
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative uvicorn
|
|
|
|
|
|
|
|
%check
|
2020-11-30 16:11:56 +00:00
|
|
|
# Required for reporting bugs
|
|
|
|
%python_exec -m uvicorn --version
|
2022-07-20 10:11:36 +00:00
|
|
|
%pytest
|
2020-10-13 09:32:40 +00:00
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE.md
|
|
|
|
%python_alternative %{_bindir}/uvicorn
|
2022-07-20 10:11:36 +00:00
|
|
|
%{python_sitelib}/uvicorn
|
|
|
|
%{python_sitelib}/uvicorn-%{version}*-info
|
2020-10-13 09:32:40 +00:00
|
|
|
|
|
|
|
%changelog
|