6070b05
%global srcname asgiref
6070b05
b8ef332
%global common_description %{expand:
b8ef332
ASGI is a standard for Python asynchronous web apps and servers to communicate
b8ef332
with each other, and positioned as an asynchronous successor to WSGI.  This
b8ef332
package includes ASGI base libraries, such as:
6070b05
b8ef332
* Sync-to-async and async-to-sync function wrappers, asgiref.sync
b8ef332
* Server base classes, asgiref.server
b8ef332
* A WSGI-to-ASGI adapter, in asgiref.wsgi}
b8ef332
ef1d6d2
%bcond_with  tests
6070b05
6070b05
f36edcc
Name:           python-%{srcname}
f36edcc
Version:        3.4.1
ef1d6d2
Release:        %autorelease
6070b05
Summary:        ASGI specs, helper code, and adapters
cb241f2
# This is BSD + bundled async-timeout ASL 2.0
cb241f2
License:        BSD and ASL 2.0
6070b05
URL:            https://github.com/django/asgiref
6070b05
# PyPI tarball doesn't have tests
6070b05
Source0:        %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
6070b05
BuildArch:      noarch
6070b05
6070b05
b8ef332
%description %{common_description}
6070b05
6070b05
f36edcc
%package -n python3-%{srcname}
6070b05
Summary:        %{summary}
6070b05
BuildRequires:  python3-devel
cb241f2
# https://github.com/django/asgiref/commit/9c6df6e02700092eb19adefff3552d44388f69b8
cb241f2
Provides:       bundled(python3dist(async-timeout)) == 3.0.1
6070b05
f36edcc
f36edcc
%description -n python3-%{srcname} %{common_description}
6070b05
6070b05
6070b05
%prep
6070b05
%autosetup -n %{srcname}-%{version}
6070b05
6070b05
f36edcc
%generate_buildrequires
0a03f41
%pyproject_buildrequires %{?with_tests:-e %{toxenv}-test}
f36edcc
f36edcc
6070b05
%build
f36edcc
%pyproject_wheel
6070b05
6070b05
6070b05
%install
f36edcc
%pyproject_install
f36edcc
%pyproject_save_files %{srcname}
6070b05
6070b05
6070b05
%if %{with tests}
6070b05
%check
f36edcc
%tox -e %{toxenv}-test
6070b05
%endif
6070b05
6070b05
f36edcc
%files -n python3-%{srcname} -f %{pyproject_files}
6070b05
%license LICENSE
6070b05
%doc README.rst
6070b05
6070b05
6070b05
%changelog
ef1d6d2
%autochangelog