15
0
forked from pool/python-gevent
Files
python-gevent/python-gevent.spec
Tomáš Chvátal fb0d68427e - Version update to 1.4.0:
* generate with cython 0.29
  * Refactored the gevent test runner and test suite to make them more reusable. In particular, the tests are now run with python -m gevent.tests. See issue #1293.
  * Formatting run info no longer includes gevent.local.local objects that have no value in the greenlet. See issue #1275.
  * Fixed negative length in pywsgi’s Input read functions for non chunked body. Reported in issue #1274 by tzickel.
  * Fix opening files in text mode in CPython 2 on Windows by patching libuv. See issue #1282 reported by wiggin15.
  * gevent now depends on greenlet 0.4.14 or above.
  * gevent.local.local subclasses correctly supports @staticmethod functions. Reported by Brendan Powers in issue #1266.
- Do NOT bundle c-ares and libev

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gevent?expand=0&rev=47
2019-01-31 10:12:19 +00:00

108 lines
3.5 KiB
RPMSpec

#
# spec file for package python-gevent
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-gevent
Version: 1.4.0
Release: 0
Summary: Python network library that uses greenlet and libevent
License: MIT
Group: Development/Languages/Python
URL: http://www.gevent.org/
Source: https://files.pythonhosted.org/packages/source/g/gevent/gevent-%{version}.tar.gz
Source100: %{name}-rpmlintrc
Patch0: 0001-always-obey-GEVENT_NO_CFFI_BUILD.patch
BuildRequires: %{python_module cffi}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module greenlet >= 0.4.14}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module objgraph}
BuildRequires: %{python_module setuptools}
BuildRequires: c-ares-devel
BuildRequires: fdupes
BuildRequires: libev-devel
BuildRequires: python-rpm-macros
BuildRequires: python3-testsuite
Requires: python-cffi
Requires: python-greenlet
%if 0%{?suse_version} || 0%{?fedora_version} || 0%{?rhel} >= 8
Recommends: python-psutil
%else
Requires: python-psutil
%endif
%python_subpackages
%description
Gevent is a Python networking library that uses greenlet to provide synchronous
API on top of a libevent event loop. Features include:
* Fast event loop based on libevent.
* Lightweight execution units based on greenlet.
* Familiar API that re-uses concepts from the Python standard library.
* Cooperative sockets with ssl support.
* DNS queries performed through libevent-dns.
* Ability to use standard library and 3rd party modules written for standard
blocking sockets
* Fast WSGI server based on libevent-http.
gevent is inspired by eventlet but features more consistent API, simpler
implementation and better performance. Read why others use gevent and check
out the list of the open source projects based on gevent.
%package -n python-gevent-doc
Summary: Documentation for %{name}
Group: Documentation/Other
Provides: %{python_module gevent-doc = %{version}}
%description -n python-gevent-doc
Documentation and examples for %{name}.
%prep
%setup -q -n gevent-%{version}
%patch0 -p1
%build
export LIBEV_EMBED=0
export CARES_EMBED=0
export GEVENT_NO_CFFI_BUILD=1
%python_build
%install
export LIBEV_EMBED=0
export CARES_EMBED=0
export GEVENT_NO_CFFI_BUILD=1
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
# tests passed as 20 need network connection with no way to skip
export GEVENT_RESOLVER=thread
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m gevent.tests || :
%files %{python_files}
%doc AUTHORS README.rst TODO CHANGES.rst CONTRIBUTING.rst
%license LICENSE*
%{python_sitearch}/gevent-%{version}-py*.egg-info
%{python_sitearch}/gevent/
%files -n python-gevent-doc
%license LICENSE*
%doc examples/
%changelog