Blob Blame History Raw
# what it's called on pypi
%global srcname daphne
# 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:
Daphne is a HTTP, HTTP2 and WebSocket protocol server for ASGI and ASGI-HTTP,
developed to power Django Channels.  It supports automatic negotiation of
protocols; there’s no need for URL prefixing to determine WebSocket endpoints
versus HTTP endpoints.}

%bcond_without  tests

Name:           python-%{pkgname}
Version:        3.0.1
Release:        1%{?dist}
Summary:        Django ASGI (HTTP/WebSocket) server
License:        BSD
# PyPI tarball doesn't have tests
Source0:        %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
BuildArch:      noarch

%description %{common_description}

%package -n python3-%{pkgname}
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  %{py3_dist setuptools pytest-runner}
%if %{with tests}
BuildRequires:  %{py3_dist pytest pytest-asyncio hypothesis}
BuildRequires:  %{py3_dist twisted autobahn asgiref}
%{?python_provide:%python_provide python3-%{pkgname}}

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

%autosetup -n %{srcname}-%{version}
rm -rf %{eggname}.egg-info



%if %{with tests}
%pytest --verbose

%files -n python3-%{pkgname}
%license LICENSE
%doc README.rst

* Fri Mar 19 2021 Charalampos Stratakis <> - 3.0.1-1
- Update to 3.0.1 (rhbz#1892469)

* Wed Jan 27 2021 Fedora Release Engineering <> - 2.5.0-3
- Rebuilt for

* Wed Jul 29 2020 Fedora Release Engineering <> - 2.5.0-2
- Rebuilt for

* Fri Jun 05 2020 Carl George <> - 2.5.0-1
- Initial package