@ -3,8 +3,8 @@
%global optflags %(echo %{optflags} -I%{_includedir}/libev)
%global optflags %(echo %{optflags} -I%{_includedir}/libev)
Name: python-%{modname}
Name: python-%{modname}
Version: 20.5 .0
Version: 20.6 .0
Release: 2 %{?dist}
Release: 1 %{?dist}
Summary: A coroutine-based Python networking library
Summary: A coroutine-based Python networking library
License: MIT
License: MIT
@ -14,6 +14,7 @@ Source0: %{pypi_source %{modname} %{version} tar.gz}
BuildRequires: gcc
BuildRequires: gcc
BuildRequires: c-ares-devel
BuildRequires: c-ares-devel
BuildRequires: libev-devel
BuildRequires: libev-devel
BuildRequires: libuv-devel
%description
%description
gevent is a coroutine-based Python networking library that uses greenlet to
gevent is a coroutine-based Python networking library that uses greenlet to
@ -33,8 +34,12 @@ Summary: %{summary}
%{?python_provide:%python_provide python3-%{modname}}
%{?python_provide:%python_provide python3-%{modname}}
BuildRequires: python3-devel
BuildRequires: python3-devel
BuildRequires: python3-Cython
BuildRequires: python3-Cython
BuildRequires: python3-greenlet-devel
BuildRequires: python3-greenlet-devel >= 0.4.16
Requires: python3-greenlet
# For tests
BuildRequires: python3-dns
BuildRequires: python3-psutil
BuildRequires: python3-zope-interface
Requires: python3-greenlet >= 0.4.16
%description -n python3-%{modname}
%description -n python3-%{modname}
gevent is a coroutine-based Python networking library that uses greenlet to
gevent is a coroutine-based Python networking library that uses greenlet to
@ -61,19 +66,15 @@ rm -r deps
sed -i -e 's/include_package_data=True/include_package_data=False/' setup.py
sed -i -e 's/include_package_data=True/include_package_data=False/' setup.py
# Force re-cythonizing the sources
# Force re-cythonizing the sources
rm src/gevent/*.c src/gevent/libev/_*.c
rm $(grep -rl '/\* Generated by Cython')
%build
%build
export LIBEV_EMBED=0
export GEVENTSETUP_EMBED=0
export CARES_EMBED=0
export GEVENT_NO_CFFI_BUILD=1
# Build Python 3 first to use Python 3 Cython
# Build Python 3 first to use Python 3 Cython
%py3_build
%py3_build
%install
%install
export LIBEV_EMBED=0
export GEVENTSETUP_EMBED=0
export CARES_EMBED=0
export GEVENT_NO_CFFI_BUILD=1
%py3_install
%py3_install
rm %{buildroot}%{python3_sitearch}/%{modname}/_*2.py
rm %{buildroot}%{python3_sitearch}/%{modname}/_*2.py
rm %{buildroot}%{python3_sitearch}/%{modname}/__pycache__/_*2.*
rm %{buildroot}%{python3_sitearch}/%{modname}/__pycache__/_*2.*
@ -81,12 +82,25 @@ find %{buildroot} -name '.buildinfo' -delete
# Correct the permissions.
# Correct the permissions.
find %{buildroot} -name '*.so' -exec chmod 755 {} ';'
find %{buildroot} -name '*.so' -exec chmod 755 {} ';'
%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}
%files -n python3-%{modname}
%license LICENSE
%license LICENSE
%doc README.rst
%doc README.rst
%{python3_sitearch}/%{modname}*
%{python3_sitearch}/%{modname}*
%changelog
%changelog
* Sat Jun 06 2020 Orion Poplawski <orion@nwra.com> - 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 <mhroncok@redhat.com> - 20.5.0-2
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 20.5.0-2
- Rebuilt for Python 3.9
- Rebuilt for Python 3.9