Blob Blame History Raw
%global srcname sseclient

%global desc This is a Python client library for iterating over http Server \
Sent Event (SSE) streams (also known as EventSource, after the name of the \
Javascript interface inside browsers). The SSEClient class accepts a url on \
init, and is then an iterator over messages coming from the server.\


Name:           python-%{srcname}
Version:        0.0.18
Release:        4%{?dist}
Summary:        A Python library for iterating over HTTP Server Sent Events (SSE)

License:        MIT
URL:            https://github.com/btubbs/%{srcname}
Source0:        %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
BuildRequires:  %{py2_dist mock pkginfo pytest requests six}

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  %{py3_dist mock pkginfo pytest requests six}


%description
%{desc}


%package -n python2-%{srcname}
Summary:        %{summary}
Requires:       %{py2_dist requests six}
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
%{desc}


%package -n python3-%{srcname}
Summary:        %{summary}
Requires:       %{py3_dist requests six}
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
Twine is a utility for interacting with PyPI.
Currently it only supports registering projects and uploading distributions.


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


%build
%py2_build
%py3_build


%install
%py2_install
%py3_install


%check
py.test-2
py.test-3


%files -n python2-%{srcname}
%license LICENSE
%doc README.rst
%{python2_sitelib}/%{srcname}-%{version}-*.egg-info
%{python2_sitelib}/sseclient.py*


%files -n python3-%{srcname}
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{srcname}-%{version}-*.egg-info
%{python3_sitelib}/sseclient.py*
%{python3_sitelib}/__pycache__/sseclient*


%changelog
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.18-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 0.0.18-3
- Rebuilt for Python 3.7

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.18-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Sep 28 2017 Jeremy Cline <jeremy@jcline.org> - 0.0.18-1
- Initial package