# what it's called on pypi %global srcname wsproto # what it's imported as %global libname %{srcname} # name of egg info directory %global eggname %{srcname} # package name fragment %global pkgname %{srcname} %global _description \ wsproto is a pure-Python implementation of a WebSocket protocol stack. It is\ written from the ground up to be embeddable in whatever program you choose to\ use, ensuring that you can communicate via WebSockets, as defined in RFC6455,\ regardless of your programming paradigm.\ \ wsproto does not provide a parsing layer, a network layer, or any rules about\ concurrency. Instead, it is a purely in-memory solution, defined in terms of\ data actions and WebSocket frames. RFC6455 and Compression Extensions for\ WebSocket via RFC7692 are fully supported.\ \ wsproto supports Python 2.7 and 3.5 or higher. %bcond_without tests Name: python-%{pkgname} Version: 0.12.0 Release: 1%{?dist} Summary: WebSockets state-machine based protocol implementation License: MIT URL: https://github.com/python-hyper/wsproto Source0: %pypi_source BuildArch: noarch %description %{_description} %package -n python%{python3_pkgversion}-%{pkgname} Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %if %{with tests} BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-h11 %endif Requires: python%{python3_pkgversion}-h11 %{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}} %description -n python%{python3_pkgversion}-%{pkgname} %{_description} %prep %autosetup -n %{srcname}-%{version} rm -rf %{eggname}.egg-info %build %py3_build %install %py3_install %if %{with tests} %check PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} --verbose test %endif %files -n python%{python3_pkgversion}-%{pkgname} %license LICENSE %doc README.rst %{python3_sitelib}/%{libname} %{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info %changelog * Sun Oct 14 2018 Carl George - 0.12.0-1 - Initial package