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
21e5229
%bcond tests 1
6070b05
21e5229
Name:           python-asgiref
21e5229
Version:        3.7.2
ef1d6d2
Release:        %autorelease
6070b05
Summary:        ASGI specs, helper code, and adapters
7eb7a72
# main source code is BSD-3-Clause
7eb7a72
# bundled async-timeout is Apache-2.0
7eb7a72
License:        BSD-3-Clause AND Apache-2.0
6070b05
URL:            https://github.com/django/asgiref
21e5229
Source:         %{pypi_source asgiref}
6070b05
BuildArch:      noarch
6070b05
6070b05
b8ef332
%description %{common_description}
6070b05
6070b05
21e5229
%package -n python3-asgiref
6070b05
Summary:        %{summary}
6070b05
BuildRequires:  python3-devel
cb241f2
# https://github.com/django/asgiref/commit/9c6df6e02700092eb19adefff3552d44388f69b8
21e5229
# This code is modified and probably cannot be unvendored.
cb241f2
Provides:       bundled(python3dist(async-timeout)) == 3.0.1
6070b05
f36edcc
21e5229
%description -n python3-asgiref %{common_description}
6070b05
6070b05
6070b05
%prep
21e5229
%autosetup -n asgiref-%{version}
21e5229
21e5229
# avoid additional mypy build requirement
21e5229
sed '/^\s*mypy\s*>=/d' -i setup.cfg
21e5229
6070b05
6070b05
f36edcc
%generate_buildrequires
21e5229
%pyproject_buildrequires %{?with_tests:-x tests}
f36edcc
f36edcc
6070b05
%build
f36edcc
%pyproject_wheel
6070b05
6070b05
6070b05
%install
f36edcc
%pyproject_install
21e5229
%pyproject_save_files asgiref
6070b05
6070b05
6070b05
%check
21e5229
%if %{with tests}
21e5229
%pytest --verbose
21e5229
%else
21e5229
%pyproject_check_import
6070b05
%endif
6070b05
6070b05
21e5229
%files -n python3-asgiref -f %{pyproject_files}
6070b05
%doc README.rst
6070b05
6070b05
6070b05
%changelog
ef1d6d2
%autochangelog