15
0
forked from pool/python-gevent

Accepting request 1056058 from home:bnavigator:branches:devel:languages:python

- Update to 22.10.2
  * Update to greenlet 2.0. This fixes a deallocation issue that
    required a change in greenlet's ABI. The design of greenlet 2.0
    is intended to prevent future fixes and enhancements from
    requiring an ABI change, making it easier to update gevent and
    greenlet independently.
  * Caution: greenlet 2.0 requires a modern-ish C++ compiler. This
    may mean certain older platforms are no longer supported. See
    :issue:`1909`.

OBS-URL: https://build.opensuse.org/request/show/1056058
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gevent?expand=0&rev=81
This commit is contained in:
2023-01-04 21:25:00 +00:00
committed by Git OBS Bridge
parent 5a3b543597
commit eeca9bf90c
5 changed files with 38 additions and 26 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-gevent
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,40 +23,31 @@
%define use_bundled_libev 0
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define modname gevent
Name: python-gevent
Version: 22.10.1
Version: 22.10.2
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
Source0: https://github.com/gevent/%{modname}/archive/%{version}.tar.gz#/%{modname}-%{version}.tar.gz
Source0: https://github.com/gevent/gevent/archive/%{version}.tar.gz#/gevent-%{version}.tar.gz
Source100: %{name}-rpmlintrc
# gcc7 for 15.1 produces no-return-in-nonvoid-function, but the same compiler for 15.2 not
# usually, as long as no return value is used, this shouldn't be treated as an error
# let's selectively disable the warning around the offending code
Patch0: fix-no-return-in-nonvoid-function.patch
Patch1: skip-tests-in-leap.patch
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module cffi}
BuildRequires: %{python_module Cython >= 3.0~a11}
BuildRequires: %{python_module cffi >= 1.12.3}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module dnspython}
BuildRequires: %{python_module greenlet >= 1.1.0}
BuildRequires: %{python_module objgraph}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module greenlet >= 2}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module zope.event}
BuildRequires: %{python_module zope.interface}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
# /etc/protocols needed for tests
BuildRequires: netcfg
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: python3-testsuite
BuildRequires: pkgconfig(libcares)
%if ! 0%{use_bundled_libev}
BuildRequires: pkgconfig(libev)
@@ -73,6 +64,17 @@ Recommends: python-psutil
%else
Requires: python-psutil
%endif
# SECTION test
# /etc/protocols needed for tests
BuildRequires: netcfg
BuildRequires: %{python_module dnspython}
BuildRequires: %{python_module objgraph}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module zope.event}
BuildRequires: %{python_module zope.interface}
BuildRequires: python3-testsuite
# /SECTION
%python_subpackages
%description
@@ -117,12 +119,10 @@ sed -i -e '1{/bin.*python/d}' src/gevent/tests/*.py
export LIBEV_EMBED=%{use_bundled_libev}
export CARES_EMBED=0
export CFLAGS="%{optflags} -fno-strict-aliasing"
%python_build
%pyproject_wheel
%install
export LIBEV_EMBED=%{use_bundled_libev}
export CARES_EMBED=0
%python_install
%pyproject_install
%{python_expand # fix script interpreter-line and exec bit
sed -i '1{s|^#!.*bin.*python.*$|#!%{__$python}|}' %{buildroot}%{$python_sitearch}/gevent/testing/testrunner.py
chmod +x %{buildroot}%{$python_sitearch}/gevent/testing/testrunner.py
@@ -170,7 +170,7 @@ fi
%files %{python_files}
%doc AUTHORS README.rst TODO CHANGES.rst CONTRIBUTING.rst
%license LICENSE*
%{python_sitearch}/gevent-%{version}-py*.egg-info
%{python_sitearch}/gevent-%{version}.dist-info
%{python_sitearch}/gevent/
%files -n python-gevent-doc