From eb4e1534b4c5fc89c1127c835835dedb0dec6a7b Mon Sep 17 00:00:00 2001 From: rdobuilder Date: Oct 06 2023 10:33:38 +0000 Subject: Import from python-gevent-23.7.0-2.fc39 Related-to: https://review.rdoproject.org/r/q/I8407efbd225b3985d6aae51f985357179af69f16 --- diff --git a/.python-gevent.metadata b/.python-gevent.metadata index 34df431..009870a 100644 --- a/.python-gevent.metadata +++ b/.python-gevent.metadata @@ -1 +1 @@ -3a2ab5f982db6d2ebe8f3763f1563b40343c782e SOURCES/gevent-1.2.2.tar.gz +be983fb45cadf9411f4dccc4d1733abd003c36c7 SOURCES/gevent-23.7.0.tar.gz diff --git a/SPECS/python-gevent.spec b/SPECS/python-gevent.spec index e5e470c..7ed9259 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: 23.7.0 +Release: 2%{?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,17 @@ 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 >= 2.0.0 +BuildRequires: python3-setuptools +# For tests +BuildRequires: python3-dns +BuildRequires: python3-psutil +BuildRequires: python3-zope-event +BuildRequires: python3-zope-interface %description -n python3-%{modname} gevent is a coroutine-based Python networking library that uses greenlet to @@ -82,7 +57,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 +65,26 @@ 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') +rm src/gevent/_generated_include/* + %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 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 +92,128 @@ 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 +* Fri Jul 21 2023 Fedora Release Engineering - 23.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Jul 17 2023 Orion Poplawski - 23.7.0-1 +- Update to 23.7.0 + +* Tue Jun 27 2023 Orion Poplawski - 22.10.2-3 +- Add patch to remove match_hostname import + +* Thu Jun 15 2023 Python Maint - 22.10.2-2 +- Rebuilt for Python 3.12 + +* Thu Jun 15 2023 Petr Viktorin - 22.10.2-1 +- Update to 22.10.2 + +* Fri Jan 20 2023 Fedora Release Engineering - 21.12.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 21.12.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue Jun 14 2022 Python Maint - 21.12.0-3 +- Rebuilt for Python 3.11 + +* Wed Jun 01 2022 Miro Hrončok - 21.12.0-2 +- Support Python 3.11 + +* Sun Mar 06 2022 Orion Poplawski - 21.12.0-1 +- Update to 21.12.0 + +* Fri Jan 21 2022 Fedora Release Engineering - 21.1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 21.1.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 21.1.2-2 +- Rebuilt for Python 3.10 + +* 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