Blob Blame History Raw
%global srcname asgiref

%global common_description %{expand:
ASGI is a standard for Python asynchronous web apps and servers to communicate
with each other, and positioned as an asynchronous successor to WSGI.  This
package includes ASGI base libraries, such as:

* Sync-to-async and async-to-sync function wrappers, asgiref.sync
* Server base classes, asgiref.server
* A WSGI-to-ASGI adapter, in asgiref.wsgi}

%bcond_without  tests

Name:           python-%{srcname}
Version:        3.4.1
Release:        %autorelease
Summary:        ASGI specs, helper code, and adapters
# This is BSD + bundled async-timeout ASL 2.0
License:        BSD and ASL 2.0
# PyPI tarball doesn't have tests
Source0:        %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
BuildArch:      noarch

%description %{common_description}

%package -n python3-%{srcname}
Summary:        %{summary}
BuildRequires:  python3-devel
Provides:       bundled(python3dist(async-timeout)) == 3.0.1

%description -n python3-%{srcname} %{common_description}

%autosetup -n %{srcname}-%{version}

%pyproject_buildrequires %{?with_tests:-e %{toxenv}-test}


%pyproject_save_files %{srcname}

%if %{with tests}
%tox -e %{toxenv}-test

%files -n python3-%{srcname} -f %{pyproject_files}
%license LICENSE
%doc README.rst