15
0
forked from pool/python-gevent

Accepting request 489462 from home:TheBlackCat:branches:devel:languages:python

- Update to version 1.2.1
- Implement single-spec version

OBS-URL: https://build.opensuse.org/request/show/489462
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gevent?expand=0&rev=26
This commit is contained in:
Todd R
2017-04-19 21:11:21 +00:00
committed by Git OBS Bridge
parent 30005d87dc
commit d7aca0453a
5 changed files with 269 additions and 25 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-gevent
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# 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
@@ -16,25 +16,35 @@
#
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif
# Tests require network connection
%bcond_with tests
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-gevent
Version: 1.1.2
Version: 1.2.1
Release: 0
Summary: Python network library that uses greenlet and libevent
License: MIT
Group: Development/Languages/Python
Url: http://www.gevent.org/
Source: https://pypi.io/packages/source/g/gevent/gevent-%{version}.tar.gz
BuildRequires: libcares-devel
BuildRequires: libev-devel
#BuildRequires: python-Sphinx
BuildRequires: python-devel
BuildRequires: python-greenlet
BuildRequires: python-nose
Source: https://files.pythonhosted.org/packages/source/g/gevent/gevent-%{version}.tar.gz
Source100: %{name}-rpmlintrc
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module cffi}
BuildRequires: %{python_module greenlet}
# Documentation requirements
BuildRequires: python3-Sphinx
%if %{with tests}
BuildRequires: %{python_module nose}
%endif
Requires: python-cffi
Requires: python-greenlet
Recommends: python-psutil
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%python_subpackages
%description
Gevent is a Python networking library that uses greenlet to provide synchronous
@@ -53,25 +63,42 @@ 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}
# Remove bundled libraries
rm -rf c-ares libev
%build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
#cd doc && make html && rm _build/html/.buildinfo # Build HTML documentation
%python_build
cd doc && make html && rm _build/html/.buildinfo # Build HTML documentation
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%if %{with tests}
%check
nosetests
pushd src/greentest
export GEVENT_RESOLVER=thread
%python_exec testrunner.py --config known_failures.py
popd
%endif
%files
%files %{python_files}
%defattr(-,root,root,-)
%doc AUTHORS changelog.rst LICENSE* README.rst TODO examples
#%%doc doc/_build/html
%{python_sitearch}/*
%doc AUTHORS LICENSE* README.rst TODO
%{python_sitearch}/gevent-%{version}-py*.egg-info
%{python_sitearch}/gevent/
%files -n python-gevent-doc
%defattr(-,root,root,-)
%doc examples/
%doc doc/_build/html
%changelog