30c8a3
%global modname eventlet
30c8a3
%global bundle_dns 1
30c8a3
%{?python_enable_dependency_generator}
30c8a3
30c8a3
Name:           python-%{modname}
30c8a3
Version:        0.31.1
30c8a3
Release:        1%{?dist}
30c8a3
Summary:        Highly concurrent networking library
30c8a3
%if %bundle_dns
30c8a3
License:        MIT and ISC
30c8a3
%else
30c8a3
License:        MIT
30c8a3
%endif
30c8a3
30c8a3
URL:            http://eventlet.net
30c8a3
Source0:        https://github.com/eventlet/%{modname}/archive/v%{version}.zip
30c8a3
Source1:        %{pypi_source dnspython 1.16.0 zip}
30c8a3
Patch0:         switch_to_python_cryptography.patch
30c8a3
30c8a3
# Since Python 3.10 MutableMapping is available in collections.abc instead of collections.
30c8a3
# This is already fixed in dnspython 2.0.0+, but eventlet still uses old 1.16.0.
30c8a3
Patch1:         0001-import-MutableMapping-from-collections.abc.patch
30c8a3
# Backport of upstream PR to introduce compatibility with Python 3.10
30c8a3
# https://github.com/eventlet/eventlet/pull/715
30c8a3
Patch715:       https://github.com/eventlet/eventlet/pull/715.patch
30c8a3
30c8a3
BuildArch:      noarch
30c8a3
30c8a3
%description
30c8a3
Eventlet is a networking library written in Python. It achieves high
30c8a3
scalability by using non-blocking io while at the same time retaining
30c8a3
high programmer usability by using coroutines to make the non-blocking
30c8a3
io operations appear blocking at the source code level.
30c8a3
30c8a3
%package -n python3-%{modname}
30c8a3
Summary:        %{summary}
30c8a3
BuildArch:      noarch
30c8a3
BuildRequires:  python3-devel
30c8a3
BuildRequires:  python3-setuptools
30c8a3
BuildRequires:  python3dist(greenlet) >= 0.3
30c8a3
BuildRequires:  python3dist(monotonic) >= 1.4
30c8a3
BuildRequires:  python3dist(six) >= 1.10
30c8a3
BuildRequires:  python3-nose
30c8a3
BuildRequires:  python3-pyOpenSSL
30c8a3
30c8a3
%if %bundle_dns
30c8a3
Provides:       bundled(python3dist(dnspython)) = 1.16.0
30c8a3
BuildRequires:  python3-cryptography
30c8a3
Recommends:     python3-cryptography
30c8a3
%else
30c8a3
BuildRequires:  python3dist(dnspython) >= 1.15
30c8a3
BuildRequires:  python3dist(dnspython) < 2
30c8a3
%endif
30c8a3
30c8a3
%{?python_provide:%python_provide python3-%{modname}}
30c8a3
30c8a3
30c8a3
%description -n python3-%{modname}
30c8a3
Eventlet is a networking library written in Python. It achieves high
30c8a3
scalability by using non-blocking io while at the same time retaining
30c8a3
high programmer usability by using coroutines to make the non-blocking
30c8a3
io operations appear blocking at the source code level.
30c8a3
30c8a3
%package -n python3-%{modname}-doc
30c8a3
Summary:        Documentation for python3-%{modname}
30c8a3
BuildRequires:  python3-sphinx
30c8a3
BuildRequires:  python3-zmq
30c8a3
30c8a3
%description -n python3-%{modname}-doc
30c8a3
%{summary}.
30c8a3
30c8a3
%prep
30c8a3
%if %bundle_dns
30c8a3
%setup -n %{modname}-%{version} -q -a1
30c8a3
%else
30c8a3
%setup -n %{modname}-%{version} -q
30c8a3
%endif
30c8a3
%patch -P 715 -p1
30c8a3
# Remove dependency on enum-compat from setup.py
30c8a3
# enum-compat is not needed for Python 3
30c8a3
sed -i "/'enum-compat',/d" setup.py
30c8a3
%if %bundle_dns
30c8a3
# We bundle last version of dns1 as eventlet does not support yet dns2
30c8a3
pushd dnspython-1.16.0
30c8a3
%patch -P 0 -p1
30c8a3
%patch -P 1 -p1
30c8a3
grep -lRZ "dns\." dns | xargs -0 -l sed -i -e 's/\([^[a-zA-Z]\)dns\./\1eventlet\.dns\./g'
30c8a3
grep -lRZ "^import dns$" dns | xargs -0 -l sed -i -e 's/^import\ dns$/import\ eventlet\.dns/'
30c8a3
popd
30c8a3
mv dnspython-1.16.0/dns eventlet
30c8a3
sed -i '/dnspython >= 1.15.0, < 2.0.0/d' setup.py
30c8a3
sed -i "s/import_patched('dns/import_patched('eventlet\.dns/g" eventlet/support/greendns.py
30c8a3
cp -a dnspython-1.16.0/LICENSE LICENSE.dns
30c8a3
rm -vrf dnspython-1.16.0
30c8a3
%endif
30c8a3
rm -vrf *.egg-info
30c8a3
30c8a3
%build
30c8a3
%py3_build
30c8a3
30c8a3
# Disable setting up dns (we have no /etc/resolv.conf in mock
30c8a3
export EVENTLET_NO_GREENDNS=yes
30c8a3
export PYTHONPATH=$(pwd)
30c8a3
sphinx-build-%{python3_version} -b html -d doctrees doc html-3
30c8a3
30c8a3
%install
30c8a3
%py3_install
30c8a3
rm -vrf %{buildroot}%{python3_sitelib}/tests
30c8a3
30c8a3
%check
30c8a3
# Disable setting up dns (we have no /etc/resolv.conf in mock
30c8a3
export EVENTLET_NO_GREENDNS=yes
30c8a3
# Tests are written only for Python 3
30c8a3
nosetests-%{python3_version} -v -e greendns_test -e socket_test -e test_patcher_existing_locks_locked
30c8a3
30c8a3
%files -n python3-%{modname}
30c8a3
%doc README.rst AUTHORS LICENSE NEWS
30c8a3
%license LICENSE
30c8a3
%if %bundle_dns
30c8a3
%license LICENSE.dns
30c8a3
%endif
30c8a3
%{python3_sitelib}/%{modname}/
30c8a3
%{python3_sitelib}/%{modname}-*.egg-info/
30c8a3
30c8a3
%files -n python3-%{modname}-doc
30c8a3
%license LICENSE
30c8a3
%doc html-3
30c8a3
30c8a3
%changelog
30c8a3
* Fri Jul 30 2021 Kevin Fenzi <kevin@scrye.com> - 0.31.1-1
30c8a3
- Update to 0.31.1. Fixes rhbz#1981430
30c8a3
- Fix FTBFS rhbz#1981320
30c8a3
30c8a3
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.31.0-4
30c8a3
- Second attempt - Rebuilt for
30c8a3
  https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
30c8a3
30c8a3
* Wed Jun 16 2021 Tomas Hrnciar <thrnciar@redhat.com> - 0.31.0-3
30c8a3
- Backport upstream patch to add compatibility of Eventlet with Python 3.10
30c8a3
- Fixes: rhbz#1913291
30c8a3
30c8a3
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.31.0-2
30c8a3
- Rebuilt for Python 3.10
30c8a3
30c8a3
* Sun May 16 2021 Kevin Fenzi <kevin@scrye.com> - 0.31.0-1
30c8a3
- Update to 0.31.0. Fixes rhbz#1957249
30c8a3
- Mitigates CVE-2021-21419
30c8a3
30c8a3
* Sun Mar 07 2021 Kevin Fenzi <kevin@scrye.com> - 0.30.2-1
30c8a3
- Update to 0.30.2. Fixes rhbz#1934511
30c8a3
30c8a3
* Sun Feb 07 2021 Kevin Fenzi <kevin@scrye.com> - 0.30.1-1
30c8a3
- Update to 0.30.1. Fixes rhbz#1923933
30c8a3
30c8a3
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-2
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
30c8a3
30c8a3
* Sat Dec 26 2020 Kevin Fenzi <kevin@scrye.com> - 0.30.0-1
30c8a3
- Update to 0.30.0. (rhbz#1907221)
30c8a3
30c8a3
* Mon Nov 30 2020 Joel Capitao <jcapitao@redhat.com> - 0.29.1-2.20201102git087ba743
30c8a3
- Bundle dns1 (rhbz#1896191)
30c8a3
30c8a3
* Fri Nov 06 2020 Joel Capitao <jcapitao@redhat.com> - 0.29.1-1.20201102git087ba743
30c8a3
- Update to 0.29.1.20201102git087ba743. (rhbz#1862178)
30c8a3
30c8a3
* Sat Oct 10 2020 Kevin Fenzi <kevin@scrye.com> - 0.26.0-1
30c8a3
- Update to 0.26.0.
30c8a3
30c8a3
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.25.2-3
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
30c8a3
30c8a3
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 0.25.2-2
30c8a3
- Rebuilt for Python 3.9
30c8a3
30c8a3
* Sat Apr 18 2020 Kevin Fenzi <kevin@scrye.com> - 0.25.2-1
30c8a3
- Update to 0.25.2. Fixes bug #1822602
30c8a3
30c8a3
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.25.1-3
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
30c8a3
30c8a3
* Thu Sep 26 2019 Miro Hrončok <mhroncok@redhat.com> - 0.25.1-2
30c8a3
- Subpackage python2-eventlet has been removed
30c8a3
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
30c8a3
30c8a3
* Thu Aug 22 2019 Kevin Fenzi <kevin@scrye.com> - 0.25.1-1
30c8a3
- Update to 0.25.1. Fixes bug #1744357
30c8a3
30c8a3
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.25.0-3
30c8a3
- Rebuilt for Python 3.8
30c8a3
30c8a3
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.25.0-2
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
30c8a3
30c8a3
* Tue May 28 2019 Kevin Fenzi <kevin@scrye.com> - 0.25.0-1
30c8a3
- Update to 0.25.0. Fixes bug #1713639
30c8a3
30c8a3
* Sat Mar 09 2019 Kevin Fenzi <kevin@scrye.com> - 0.24.1-4
30c8a3
- Drop python2-eventlet-doc subpackage as python2-sphinx is going away.
30c8a3
30c8a3
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.24.1-3
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
30c8a3
30c8a3
* Tue Nov 20 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.24.1-2
30c8a3
- use python dependency generator
30c8a3
30c8a3
* Sun Oct 14 2018 Kevin Fenzi <kevin@scrye.com> - 0.24.1-1
30c8a3
- Update to 0.24.1. Fixes bug #1611023
30c8a3
30c8a3
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.0-2
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
30c8a3
30c8a3
* Fri Jun 22 2018 Miro Hrončok <mhroncok@redhat.com> - 0.23.0-1
30c8a3
- Update to 0.23.0 (#1575434)
30c8a3
- Add patch for Python 3.7 (#1594248)
30c8a3
30c8a3
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.22.1-2
30c8a3
- Rebuilt for Python 3.7
30c8a3
30c8a3
* Sun Feb 18 2018 Kevin Fenzi <kevin@scrye.com> - 0.22.1-1
30c8a3
- Update to 0.22.1. Fixes bug #1546471
30c8a3
30c8a3
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.22.0-2
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
30c8a3
30c8a3
* Sat Jan 13 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.22.0-1
30c8a3
- Update to 0.22.0
30c8a3
30c8a3
* Tue Oct  3 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 0.21.0-3
30c8a3
- Fix upstream #401
30c8a3
- Fix compat with PyOpenSSL 17.3.0
30c8a3
- Cleanup BR
30c8a3
30c8a3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.0-2
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
30c8a3
30c8a3
* Tue May 23 2017 Lumír Balhar <lbalhar@redhat.com> - 0.21.0-1
30c8a3
- Upstream 0.21.0
30c8a3
- Fix issue with enum-compat dependency for dependent packages
30c8a3
- Enable tests
30c8a3
- Fix tracebacks during docs generating by install python[23]-zmq
30c8a3
30c8a3
* Tue Apr 25 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 0.20.1-1
30c8a3
- Upstream 0.20.1
30c8a3
30c8a3
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.4-4
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
30c8a3
30c8a3
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.18.4-3
30c8a3
- Rebuild for Python 3.6
30c8a3
30c8a3
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.18.4-2
30c8a3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
30c8a3
30c8a3
* Mon Apr 25 2016 Kevin Fenzi <kevin@scrye.com> - 0.18.4-1
30c8a3
- Update to 0.18.4. Fixes bug #1329993
30c8a3
30c8a3
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.4-6
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
30c8a3
30c8a3
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17.4-5
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
30c8a3
30c8a3
* Mon Oct 19 2015 Jon Schlueter <jschluet@redhat.com> 0.17.4-4
30c8a3
- greenio: send() was running empty loop on ENOTCONN rhbz#1268351
30c8a3
30c8a3
* Thu Sep 03 2015 Pádraig Brady <pbrady@redhat.com> - 0.17.4-3
30c8a3
- Tighten up Provides: and Obsoletes: for previous change
30c8a3
30c8a3
* Tue Sep 01 2015 Chandan Kumar <chkumar246@gmail.com> - 0.17.4-2
30c8a3
- Added python3 support
30c8a3
30c8a3
* Wed Jul 22 2015 Pádraig Brady <pbrady@redhat.com> - 0.17.4-1
30c8a3
- Latest upstream
30c8a3
30c8a3
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17.3-2
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
30c8a3
30c8a3
* Tue Apr 14 2015 Pádraig Brady <pbrady@redhat.com> - 0.17.3-1
30c8a3
- Latest upstream
30c8a3
30c8a3
* Tue Mar 31 2015 Pádraig Brady <pbrady@redhat.com> - 0.17.1-1
30c8a3
- Latest upstream
30c8a3
30c8a3
* Tue Sep 02 2014 Pádraig Brady <pbrady@redhat.com> - 0.15.2-1
30c8a3
- Latest upstream
30c8a3
30c8a3
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.0-2
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
30c8a3
30c8a3
* Mon Oct 28 2013 Alan Pevec <apevec@redhat.com> - 0.14.0-1
30c8a3
- Update to 0.14.0
30c8a3
30c8a3
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.0-2
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
30c8a3
30c8a3
* Wed Feb 20 2013 Pádraig Brady 
30c8a3
- Update to 0.12.0
30c8a3
30c8a3
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.17-3
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
30c8a3
30c8a3
* Mon Nov 12 2012 Pádraig Brady 
30c8a3
- fix waitpid() override to not return immediately
30c8a3
30c8a3
* Fri Aug 03 2012 Pádraig Brady 
30c8a3
- Update to 0.9.17
30c8a3
30c8a3
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.16-7
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
30c8a3
30c8a3
* Tue Mar 27 2012 Pádraig Brady 
30c8a3
- Update patch to avoid leak of _DummyThread objects
30c8a3
30c8a3
* Mon Mar  5 2012 Pádraig Brady 
30c8a3
- Fix patch to avoid leak of _DummyThread objects
30c8a3
30c8a3
* Wed Feb 29 2012 Pádraig Brady 
30c8a3
- Apply a patch to avoid leak of _DummyThread objects
30c8a3
30c8a3
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.16-3
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
30c8a3
30c8a3
* Wed Nov 09 2011 Pádraig Brady 
30c8a3
- Apply a patch to support subprocess.Popen implementations
30c8a3
  that accept the timeout parameter, which is the case on RHEL >= 6.1
30c8a3
30c8a3
* Sat Aug 27 2011 Kevin Fenzi <kevin@scrye.com> - 0.9.16-1
30c8a3
- Update to 0.9.16
30c8a3
30c8a3
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-2
30c8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
30c8a3
30c8a3
* Wed Sep 08 2010 Lev Shamardin <shamardin@gmail.com> - 0.9.12-1
30c8a3
- Updated to version 0.9.12.
30c8a3
30c8a3
* Wed Jul 28 2010 Lev Shamardin <shamardin@gmail.com> - 0.9.9-1
30c8a3
- Updated to version 0.9.9.
30c8a3
30c8a3
* Wed Apr 14 2010 Lev Shamardin <shamardin@gmail.com> - 0.9.7-1
30c8a3
- Initial package version.