Support Python 3.11 and greenlet 2.0.0a2

This commit is contained in:
Miro Hrončok 2022-06-01 11:26:36 +02:00
commit 60426d0b96
3 changed files with 225 additions and 3 deletions

View file

@ -4,13 +4,20 @@
Name: python-%{modname}
Version: 21.12.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A coroutine-based Python networking library
License: MIT
URL: http://www.gevent.org/
Source0: %{pypi_source %{modname} %{version} tar.gz}
# Support Python 3.11
Patch: https://github.com/gevent/gevent/pull/1872.patch
# greenlet 2 has encapsulated the parent attribute:
# https://github.com/python-greenlet/greenlet/commit/5bbd0fcde8629066d1b3fc6c54dba1cc66bc9b41
Patch: greenlet2.patch
BuildRequires: gcc
BuildRequires: c-ares-devel
BuildRequires: libev-devel
@ -34,14 +41,13 @@ Summary: %{summary}
%{?python_provide:%python_provide python3-%{modname}}
BuildRequires: python3-devel
BuildRequires: python3-Cython
BuildRequires: python3-greenlet-devel >= 0.4.17
BuildRequires: (python3-greenlet-devel >= 2~~ with python3-greenlet-devel < 3)
BuildRequires: python3-setuptools
# For tests
BuildRequires: python3-dns
BuildRequires: python3-psutil
BuildRequires: python3-zope-event
BuildRequires: python3-zope-interface
Requires: python3-greenlet >= 0.4.17
%description -n python3-%{modname}
gevent is a coroutine-based Python networking library that uses greenlet to
@ -60,6 +66,9 @@ Python 3 version.
%prep
%autosetup -p1 -n %{modname}-%{version}
# Allow greenlet 2.0 only, as our patches do not support previous versions
sed -i 's/greenlet >= 1.1.0, < 2.0/greenlet == 2.0.*/' setup.py
# Remove bundled libraries
rm -r deps
# Upstream intentionally includes C extension sources in the built package,
@ -95,6 +104,9 @@ cd src/gevent/tests && GEVENT_FILE=thread %__python3 -mgevent.tests test__*subpr
%{python3_sitearch}/%{modname}*
%changelog
* Wed Jun 01 2022 Miro Hrončok <mhroncok@redhat.com> - 21.12.0-2
- Support Python 3.11 and greenlet 2.0.0a2
* Sun Mar 06 2022 Orion Poplawski <orion@nwra.com> - 21.12.0-1
- Update to 21.12.0