diff --git a/.python-gevent.metadata b/.python-gevent.metadata index 34df431..a5692a6 100644 --- a/.python-gevent.metadata +++ b/.python-gevent.metadata @@ -1 +1 @@ -3a2ab5f982db6d2ebe8f3763f1563b40343c782e SOURCES/gevent-1.2.2.tar.gz +3a9a52d5c03fab9914c72b837dc5c6127b4e9577 SOURCES/gevent-21.1.2.tar.gz diff --git a/SPECS/python-gevent.spec b/SPECS/python-gevent.spec index e5e470c..e6d349e 100644 --- a/SPECS/python-gevent.spec +++ b/SPECS/python-gevent.spec @@ -1,28 +1,20 @@ -%global __provides_exclude_from ^%{python2_sitearch}/.*\\.so$ ^%{python3_sitearch}/.*\\.so$ +%global __provides_exclude_from ^%{python3_sitearch}/.*\\.so$ %global modname gevent %global optflags %(echo %{optflags} -I%{_includedir}/libev) -%if 0%{?rhel} > 7 -# Disable python2 build by default -%bcond_with python2 -%else -%bcond_without python2 -%endif - Name: python-%{modname} -Version: 1.2.2 -Release: 4%{?dist} +Version: 21.1.2 +Release: 1%{?dist} Summary: A coroutine-based Python networking library License: MIT URL: http://www.gevent.org/ -Source0: https://files.pythonhosted.org/packages/source/g/%{modname}/%{modname}-%{version}.tar.gz - -# https://github.com/gevent/gevent/pull/979 -Patch1: 0001-always-obey-GEVENT_NO_CFFI_BUILD.patch +Source0: %{pypi_source %{modname} %{version} tar.gz} +BuildRequires: gcc BuildRequires: c-ares-devel BuildRequires: libev-devel +BuildRequires: libuv-devel %description gevent is a coroutine-based Python networking library that uses greenlet to @@ -37,34 +29,18 @@ Features include: * DNS requests done through libevent-dns * monkey patching utility to get pure Python modules to cooperate -%if %{with python2} -%package -n python2-%{modname} -Summary: %{summary} -%{?python_provide:%python_provide python2-%{modname}} -BuildRequires: python2-devel -Requires: python2-greenlet - -%description -n python2-%{modname} -gevent is a coroutine-based Python networking library that uses greenlet to -provide a high-level synchronous API on top of libevent event loop. - -Features include: - - * convenient API around greenlets - * familiar synchronization primitives (gevent.event, gevent.queue) - * socket module that cooperates - * WSGI server on top of libevent-http - * DNS requests done through libevent-dns - * monkey patching utility to get pure Python modules to cooperate - -Python 2 version. -%endif # with python2 - %package -n python3-%{modname} Summary: %{summary} %{?python_provide:%python_provide python3-%{modname}} BuildRequires: python3-devel -Requires: python3-greenlet +BuildRequires: python3-Cython +BuildRequires: python3-greenlet-devel >= 0.4.17 +BuildRequires: python3-setuptools +# For tests +BuildRequires: python3-dns +BuildRequires: python3-psutil +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 @@ -82,7 +58,7 @@ Features include: Python 3 version. %prep -%autosetup -n %{modname}-%{version} +%autosetup -p1 -n %{modname}-%{version} # Remove bundled libraries rm -r deps # Upstream intentionally includes C extension sources in the built package, @@ -90,35 +66,27 @@ rm -r deps # go into debuginfo as normal. sed -i -e 's/include_package_data=True/include_package_data=False/' setup.py +# Force re-cythonizing the sources +rm $(grep -rl '/\* Generated by Cython') + %build -export LIBEV_EMBED=0 -export CARES_EMBED=0 -export GEVENT_NO_CFFI_BUILD=1 -%if %{with python2} -rm src/gevent/_*3.py* -%py2_build -%endif # with python2 -rm src/gevent/_*2.py +export GEVENTSETUP_EMBED=0 +# Build Python 3 first to use Python 3 Cython %py3_build %install -export LIBEV_EMBED=0 -export CARES_EMBED=0 -export GEVENT_NO_CFFI_BUILD=1 -%if %{with python2} -%py2_install -%endif # with python2 +export GEVENTSETUP_EMBED=0 %py3_install +rm %{buildroot}%{python3_sitearch}/%{modname}/_*2.py +rm %{buildroot}%{python3_sitearch}/%{modname}/__pycache__/_*2.* find %{buildroot} -name '.buildinfo' -delete # Correct the permissions. find %{buildroot} -name '*.so' -exec chmod 755 {} ';' -%if %{with python2} -%files -n python2-%{modname} -%license LICENSE -%doc README.rst -%{python2_sitearch}/%{modname}* -%endif # with python2 +%check +export PYTHONPATH=%{buildroot}%{python3_sitearch} +%__python3 -m gevent.tests || : +cd src/gevent/tests && GEVENT_FILE=thread %__python3 -mgevent.tests test__*subprocess*.py %files -n python3-%{modname} %license LICENSE @@ -126,12 +94,89 @@ find %{buildroot} -name '*.so' -exec chmod 755 {} ';' %{python3_sitearch}/%{modname}* %changelog -* Mon Apr 29 2019 Brian C. Lane - 1.2.2-4 -- Remove the python2 files before running py3_install - Resolves: rhbz#1704111 +* Mon Apr 26 2021 Dan Callaghan - 21.1.2-1 +- new upstream bug fix release 21.1.2 + +* Wed Jan 27 2021 Fedora Release Engineering - 20.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Nov 16 2020 Fabien Boucher - 20.9.0-1 +- new upstream release 20.9.0 + +* Mon Oct 05 2020 Orion Poplawski - 20.6.1-3 +- BR python3-setuptools + +* Wed Jul 29 2020 Fedora Release Engineering - 20.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sat Jun 13 2020 Dan Callaghan - 20.6.1-1 +- new upstream release 20.6.1 + +* Sat Jun 06 2020 Orion Poplawski - 20.6.0-1 +- Update to 20.6.0 (bz#1840109) +- Resolve Python 3.9 issue (bz#1838696) +- Only remove Cython generated .c files +- Add BR on libuv-devel +- Use updated build variables +- Run tests, but do not fail on them for now + +* Sun May 24 2020 Miro Hrončok - 20.5.0-2 +- Rebuilt for Python 3.9 + +* Sun May 17 2020 Dan Callaghan - 20.5.0-1 +- new upstream release 20.5.0: + https://github.com/gevent/gevent/blob/20.5.0/CHANGES.rst + +* Thu Jan 30 2020 Fedora Release Engineering - 1.5-0.2.a3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jan 08 2020 Robert-André Mauchin - 1.5-0.1.a3 +- Update to 1.5a3 (#1705661) + +* Thu Oct 03 2019 Miro Hrončok - 1.3.6-7 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Sat Aug 17 2019 Miro Hrončok - 1.3.6-6 +- Rebuilt for Python 3.8 + +* Mon Aug 12 2019 Miro Hrončok - 1.3.6-5 +- Subpackage python2-gevent has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Fri Jul 26 2019 Fedora Release Engineering - 1.3.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Jun 11 2019 Victor Stinner - 1.3.6-3 +- Add Python 3.8 support, backport upstream change to use CodeType.replace() if + available (rhbz#1716342) + +* Sat Feb 02 2019 Fedora Release Engineering - 1.3.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Sep 17 2018 Dan Callaghan - 1.3.6-1 +- Upstream bug fix release 1.3.6: http://www.gevent.org/changelog.html + +* Sat Jul 14 2018 Fedora Release Engineering - 1.3.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jul 02 2018 Miro Hrončok - 1.3.4-2 +- Rebuilt for Python 3.7 + +* Tue Jun 26 2018 Dan Callaghan - 1.3.4-1 +- Update to 1.3.4 (RHBZ#1593266) + +* Mon Jun 18 2018 Miro Hrončok - 1.3.3-2 +- Rebuilt for Python 3.7 + +* Wed Jun 13 2018 Dan Callaghan - 1.3.3-1 +- Update to 1.3.3 (RHBZ#1589102) + +* Mon Jun 04 2018 Dan Callaghan - 1.3.2-1 +- Update to 1.3.2 (RHBZ#1583647) -* Wed Jul 18 2018 Charalampos Stratakis - 1.2.2-3 -- Conditionalize the python2 subpackage +* Tue May 29 2018 Dan Callaghan - 1.3.1-1 +- Update to 1.3.1 (RHBZ#1552352) + http://www.gevent.org/whatsnew_1_3.html * Fri Feb 09 2018 Fedora Release Engineering - 1.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild