14
0
Files
python-eventlet/python-eventlet.spec
Jan Matejek 1d253b8902 Accepting request 521055 from devel:languages:python:singlespec-staging
- remove dependency on metapackage "enum-compat" in favor of
  specifying this requirement the usual way via RPM requirement
  conditional on version

- singlespec auto-conversion

OBS-URL: https://build.opensuse.org/request/show/521055
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-eventlet?expand=0&rev=36
2017-09-05 09:39:53 +00:00

82 lines
2.8 KiB
RPMSpec

#
# spec file for package python-eventlet
#
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-eventlet
Version: 0.20.1
Release: 0
Summary: Highly concurrent networking library
License: MIT
Group: Development/Languages/Python
Url: http://eventlet.net
Source: https://files.pythonhosted.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module greenlet}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
%if %python_version_nodots < 34
Requires: python-enum34
%endif
Requires: python-greenlet >= 0.3
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
Eventlet is a concurrent networking library for Python that allows you to
change how you run your code, not how you write it.
It uses epoll or libevent for highly scalable non-blocking I/O. Coroutines
ensure that the developer uses a blocking style of programming that is similar
to threading, but provide the benefits of non-blocking I/O. The event dispatch
is implicit, which means you can easily use Eventlet from the Python
interpreter, or as a small part of a larger application.
%package doc
Summary: Highly concurrent networking library - Documentation
Group: Development/Libraries/Python
Requires: %{name} = %{version}
%description doc
Documentation for Eventlet, which is a concurrent networking library
for Python that allows you to change how you run your code, not how you write it.
%prep
%setup -q -n eventlet-%{version}
sed -i '/enum_compat/d' setup.py # crude way to drop the strange "enum-compat" requirement
sed -i "s|^#!.*||" eventlet/support/greendns.py # Fix non-executable script
%build
%python_build
%python_exec setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
%python_install
%files %{python_files}
%defattr(-,root,root,-)
%doc AUTHORS LICENSE NEWS README.rst
%{python_sitelib}/*
%files %{python_files doc}
%defattr(-,root,root,-)
%doc build/sphinx/html examples
%changelog