File python-trollius.spec of Package python-trollius
#
# spec file for package python-trollius
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%bcond_without test
Name: python-trollius
Version: 2.1
Release: 0
Summary: Port of the Tulip project (asyncio module, PEP 3156) on Python 2
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/haypo/trollius
Source: https://files.pythonhosted.org/packages/source/t/trollius/trollius-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-devel
BuildRequires: python-futures
BuildRequires: python-rpm-macros
BuildRequires: python-setuptools
BuildRequires: python-six
%if %{with test}
BuildRequires: python-coverage
BuildRequires: python-mock
BuildRequires: python-unittest2
%endif
Requires: python-futures
Requires: python-six
Provides: python2-trollius = %{version}
BuildArch: noarch
%description
Trollius provides infrastructure for writing single-threaded concurrent code
using coroutines, multiplexing I/O access over sockets and other resources,
running network clients and servers, and other related primitives.
%prep
%setup -q -n trollius-%{version}
rm -rf trollius.egg-info
# use correct interpreter
sed -e '1c#!%{__python2}' -i examples/tcp_echo.py examples/udp_echo.py
%build
%python2_build
%install
%python2_install
%fdupes %{buildroot}%{python2_sitelib}
%if %{with test}
%check
python2 setup.py test
%endif
%files
%defattr(-,root,root)
%doc AUTHORS COPYING README.rst TODO.rst
%doc doc/*.rst doc/trollius.jpg
%doc examples/
%{python2_sitelib}/trollius/
%{python2_sitelib}/trollius-%{version}-*.egg-info/
%changelog