From 61fe5e430a979a91661829841047596c3cadce42 Mon Sep 17 00:00:00 2001 From: Carl George Date: Aug 18 2020 19:11:22 +0000 Subject: Initial import https://bugzilla.redhat.com/show_bug.cgi?id=1844308 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7613350 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +uvicorn-*.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0f9d1b0..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# python-uvicorn - -The python-uvicorn package diff --git a/python-uvicorn.spec b/python-uvicorn.spec new file mode 100644 index 0000000..155c8ce --- /dev/null +++ b/python-uvicorn.spec @@ -0,0 +1,81 @@ +# what it's called on pypi +%global srcname uvicorn +# what it's imported as +%global libname %{srcname} +# name of egg info directory +%global eggname %{srcname} +# package name fragment +%global pkgname %{srcname} + +%global common_description %{expand: +Uvicorn is a lightning-fast ASGI server implementation, using uvloop and +httptools. Until recently Python has lacked a minimal low-level +server/application interface for asyncio frameworks. The ASGI specification +fills this gap, and means we are now able to start building a common set of +tooling usable across all asyncio frameworks. Uvicorn currently supports +HTTP/1.1 and WebSockets. Support for HTTP/2 is planned.} + +%bcond_without tests + + +Name: python-%{pkgname} +Version: 0.11.8 +Release: 1%{?dist} +Summary: The lightning-fast ASGI server +License: BSD +URL: https://www.uvicorn.org +# PyPI tarball doesn't have tests +Source0: https://github.com/encode/uvicorn/archive/%{version}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + + +%description %{common_description} + + +%package -n python3-%{pkgname} +Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: %{py3_dist setuptools} +%if %{with tests} +BuildRequires: %{py3_dist pytest requests} +BuildRequires: %{py3_dist click h11 httptools uvloop websockets wsproto watchgod} +%endif +%{?python_provide:%python_provide python3-%{pkgname}} + + +%description -n python3-%{pkgname} %{common_description} + + +%prep +%autosetup -n %{srcname}-%{version} +rm -rf %{eggname}.egg-info + + +%build +%py3_build + + +%install +%py3_install + + +%if %{with tests} +%check +%pytest --verbose +%endif + + +%files -n python3-%{pkgname} +%license LICENSE.md +%doc README.md +%{_bindir}/uvicorn +%{python3_sitelib}/%{libname} +%{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info + + +%changelog +* Tue Aug 18 2020 Carl George - 0.11.8-1 +- Latest upstream + +* Thu Jun 04 2020 Carl George - 0.11.5-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..335b2fa --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (uvicorn-0.11.8.tar.gz) = fbf7ff9cb1d71d106082723417131e23a74c5f84d213050ac35a3ab7890699cdc2a21f0975e7f5b5ee9b403c0b58c793b2c98573be1b618c1a808a1c6bf84269