c8b866b
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
c8b866b
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
c8b866b
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
c8b866b
55843a1
%{!?_licensedir:%global license %%doc}
55843a1
55843a1
%global pypi_name eventlet
55843a1
55843a1
%if 0%{?fedora}
55843a1
%global with_python3 1
55843a1
%endif
55843a1
55843a1
Name:           python-%{pypi_name}
ce1cc4e
Version:        0.21.0
38a72b4
Release:        1%{?dist}
c8b866b
Summary:        Highly concurrent networking library
c8b866b
License:        MIT
c8b866b
URL:            http://eventlet.net
38a72b4
Source0:        https://pypi.io/packages/source/e/eventlet/eventlet-%{version}.tar.gz
e7db6dc
c8b866b
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
c8b866b
BuildArch:      noarch
c8b866b
BuildRequires:  python2-devel
c8b866b
BuildRequires:  python-setuptools
38a72b4
BuildRequires:  python-greenlet
55843a1
c8b866b
Requires:       python-greenlet
c8b866b
c8b866b
%description
c8b866b
Eventlet is a networking library written in Python. It achieves high
c8b866b
scalability by using non-blocking io while at the same time retaining
c8b866b
high programmer usability by using coroutines to make the non-blocking
c8b866b
io operations appear blocking at the source code level.
c8b866b
55843a1
55843a1
%package -n python2-%{pypi_name}
55843a1
Summary:        Highly concurrent networking library
55843a1
55843a1
BuildRequires:  python2-devel
ce1cc4e
BuildRequires:  python2-nose
55843a1
BuildRequires:  python-setuptools
55843a1
Requires:       python-greenlet
ce1cc4e
Requires:       python-enum34
55843a1
0339194
%{?python_provide:%python_provide python2-%{pypi_name}}
0339194
# python_provide does not exist in CBS Cloud buildroot
0339194
Provides:   python-%{pypi_name} = %{version}-%{release}
0339194
Obsoletes:  python-%{pypi_name} < 0.17.4-3
0339194
55843a1
%description -n python2-%{pypi_name}
55843a1
Eventlet is a networking library written in Python. It achieves high
55843a1
scalability by using non-blocking io while at the same time retaining
55843a1
high programmer usability by using coroutines to make the non-blocking
55843a1
io operations appear blocking at the source code level.
55843a1
0339194
742fe88
%if 0%{?with_python3}
55843a1
%package -n python3-eventlet
55843a1
Summary:        Highly concurrent networking library
55843a1
BuildArch:      noarch
55843a1
55843a1
BuildRequires:  python3-devel
ce1cc4e
BuildRequires:  python3-nose
55843a1
BuildRequires:  python3-setuptools
38a72b4
BuildRequires:  python3-greenlet
55843a1
55843a1
Requires:       python3-greenlet
55843a1
55843a1
%{?python_provide:%python_provide python3-eventlet}
55843a1
55843a1
%description -n python3-eventlet
55843a1
Eventlet is a networking library written in Python. It achieves high
55843a1
scalability by using non-blocking io while at the same time retaining
55843a1
high programmer usability by using coroutines to make the non-blocking
55843a1
io operations appear blocking at the source code level.
55843a1
%endif
55843a1
0339194
55843a1
%package -n python2-%{pypi_name}-doc
c8b866b
Summary:        Documentation for %{name}
55843a1
BuildRequires:  python-sphinx
ce1cc4e
BuildRequires:  python2-zmq
c8b866b
0339194
%{?python_provide:%python_provide python2-%{pypi_name}-doc}
0339194
# python_provide does not exist in CBS Cloud buildroot
0339194
Provides:   python-%{pypi_name}-doc = %{version}-%{release}
0339194
Obsoletes:  python-%{pypi_name}-doc < 0.17.4-3
0339194
55843a1
%description -n python2-%{pypi_name}-doc
c8b866b
Documentation for the python-eventlet package.
c8b866b
55843a1
%if 0%{?with_python3}
55843a1
%package -n python3-eventlet-doc
55843a1
Summary: Documentation for python3-eventlet-doc
55843a1
BuildRequires:  python3-sphinx
ce1cc4e
BuildRequires:  python3-zmq
55843a1
55843a1
%description -n python3-eventlet-doc
55843a1
Documentation for the python-eventlet package.
55843a1
%endif
c8b866b
c8b866b
%prep
55843a1
%setup -q -n %{pypi_name}-%{version}
55843a1
rm -rf *.egg-info
c8b866b
ce1cc4e
# Remove dependency on enum-compat from setup.py. enum-compat is installed
ce1cc4e
# as Require for python2 subpackage and it is not needed for Python 3
ce1cc4e
sed -i "/'enum-compat',/d" setup.py
ce1cc4e
55843a1
# generate html docs
55843a1
export PYTHONPATH="$( pwd ):$PYTHONPATH"
55843a1
pushd doc
55843a1
make html
55843a1
# remove the sphinx-build leftovers
55843a1
rm -rf html/.{doctrees,buildinfo}
55843a1
popd
55843a1
55843a1
%if 0%{?with_python3}
55843a1
rm -rf %{py3dir}
55843a1
cp -a . %{py3dir}
55843a1
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
0339194
# generate html docs
55843a1
export PYTHONPATH="$( pwd ):$PYTHONPATH"
c8b866b
pushd doc
c8b866b
make html
55843a1
# remove the sphinx-build leftovers
55843a1
rm -rf html/.{doctrees,buildinfo}
55843a1
popd
55843a1
%endif
55843a1
55843a1
%build
55843a1
%{__python2} setup.py build
55843a1
55843a1
%if 0%{?with_python3}
55843a1
pushd %{py3dir}
55843a1
%{__python3} setup.py build
c8b866b
popd
c8b866b
%endif
c8b866b
ce1cc4e
%check
ce1cc4e
# Tests are written only for Python 3
ce1cc4e
%if 0%{?with_python3}
ce1cc4e
nosetests-%{python3_version}
ce1cc4e
%endif
ce1cc4e
c8b866b
%install
55843a1
%if 0%{?with_python3}
55843a1
pushd %{py3dir}
55843a1
%{__python3} setup.py install --skip-build --root %{buildroot}
38a72b4
rm -rf %{buildroot}/%{python3_sitelib}/tests
55843a1
popd
55843a1
%endif
f722c10
55843a1
%{__python2} setup.py install --skip-build --root %{buildroot}
38a72b4
rm -rf %{buildroot}/%{python2_sitelib}/tests
38a72b4
# FIXME: Those files are not meant to be used with Python 2.7
38a72b4
# Anyway the whole module eventlet.green.http is Python 3 only
38a72b4
# Trying to import it will fail under Python 2.7
38a72b4
# https://github.com/eventlet/eventlet/issues/369
38a72b4
rm -rf %{buildroot}/%{python2_sitelib}/%{pypi_name}/green/http/{cookiejar,client}.py
38a72b4
c8b866b
55843a1
%files -n python2-%{pypi_name}
55843a1
%doc README.rst AUTHORS LICENSE NEWS
55843a1
%license LICENSE
55843a1
%{python2_sitelib}/%{pypi_name}
55843a1
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
55843a1
55843a1
%if 0%{?with_python3}
55843a1
%files -n python3-%{pypi_name}
55843a1
%doc README.rst AUTHORS LICENSE NEWS
55843a1
%license LICENSE
55843a1
%{python3_sitelib}/%{pypi_name}
55843a1
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
55843a1
%endif
c8b866b
55843a1
%files -n python2-%{pypi_name}-doc
55843a1
%license LICENSE
55843a1
%doc doc/_build/html
c8b866b
55843a1
%if 0%{?with_python3}
55843a1
%files -n python3-%{pypi_name}-doc
55843a1
%license LICENSE
55843a1
%doc doc/_build/html
c8b866b
%endif
c8b866b
c8b866b
%changelog
ce1cc4e
* Tue May 23 2017 Lumír Balhar <lbalhar@redhat.com> - 0.21.0-1
ce1cc4e
- Upstream 0.21.0
ce1cc4e
- Fix issue with enum-compat dependency for dependent packages
ce1cc4e
- Enable tests
ce1cc4e
- Fix tracebacks during docs generating by install python[23]-zmq
ce1cc4e
38a72b4
* Tue Apr 25 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 0.20.1-1
38a72b4
- Upstream 0.20.1
38a72b4
e2b3cf7
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.4-4
e2b3cf7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e2b3cf7
9177a83
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.18.4-3
9177a83
- Rebuild for Python 3.6
9177a83
01b7778
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.18.4-2
01b7778
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
01b7778
15bddb2
* Mon Apr 25 2016 Kevin Fenzi <kevin@scrye.com> - 0.18.4-1
15bddb2
- Update to 0.18.4. Fixes bug #1329993
15bddb2
c2db52a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.4-6
c2db52a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
c2db52a
76c81b1
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17.4-5
76c81b1
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
76c81b1
Jon Schlueter 09a2be7
* Mon Oct 19 2015 Jon Schlueter <jschluet@redhat.com> 0.17.4-4
Jon Schlueter 09a2be7
- greenio: send() was running empty loop on ENOTCONN rhbz#1268351
Jon Schlueter 09a2be7
0339194
* Thu Sep 03 2015 Pádraig Brady <pbrady@redhat.com> - 0.17.4-3
0339194
- Tighten up Provides: and Obsoletes: for previous change
0339194
55843a1
* Tue Sep 01 2015 Chandan Kumar <chkumar246@gmail.com> - 0.17.4-2
55843a1
- Added python3 support
55843a1
6b0ea01
* Wed Jul 22 2015 Pádraig Brady <pbrady@redhat.com> - 0.17.4-1
6b0ea01
- Latest upstream
6b0ea01
7264a0a
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17.3-2
7264a0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7264a0a
174a22b
* Tue Apr 14 2015 Pádraig Brady <pbrady@redhat.com> - 0.17.3-1
174a22b
- Latest upstream
174a22b
fbd5c68
* Tue Mar 31 2015 Pádraig Brady <pbrady@redhat.com> - 0.17.1-1
fbd5c68
- Latest upstream
fbd5c68
0c1488a
* Tue Sep 02 2014 Pádraig Brady <pbrady@redhat.com> - 0.15.2-1
0c1488a
- Latest upstream
0c1488a
1a9adcb
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.0-2
1a9adcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
1a9adcb
c9064e9
* Mon Oct 28 2013 Alan Pevec <apevec@redhat.com> - 0.14.0-1
c9064e9
- Update to 0.14.0
c9064e9
7fb9ccb
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.0-2
7fb9ccb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
7fb9ccb
06766a7
* Wed Feb 20 2013 Pádraig Brady 
06766a7
- Update to 0.12.0
06766a7
eb7a935
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.17-3
eb7a935
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
eb7a935
d5dd03c
* Mon Nov 12 2012 Pádraig Brady 
d5dd03c
- fix waitpid() override to not return immediately
d5dd03c
f722c10
* Fri Aug 03 2012 Pádraig Brady 
f722c10
- Update to 0.9.17
f722c10
57ba79d
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.16-7
57ba79d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
57ba79d
87088d3
* Tue Mar 27 2012 Pádraig Brady 
87088d3
- Update patch to avoid leak of _DummyThread objects
87088d3
bf1fe4b
* Mon Mar  5 2012 Pádraig Brady 
bf1fe4b
- Fix patch to avoid leak of _DummyThread objects
bf1fe4b
0150951
* Wed Feb 29 2012 Pádraig Brady 
0150951
- Apply a patch to avoid leak of _DummyThread objects
0150951
b4c840b
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.16-3
b4c840b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
b4c840b
e7db6dc
* Wed Nov 09 2011 Pádraig Brady 
e7db6dc
- Apply a patch to support subprocess.Popen implementations
e7db6dc
  that accept the timeout parameter, which is the case on RHEL >= 6.1
e7db6dc
5eef7d9
* Sat Aug 27 2011 Kevin Fenzi <kevin@scrye.com> - 0.9.16-1
5eef7d9
- Update to 0.9.16
5eef7d9
65ecbc8
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-2
65ecbc8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
65ecbc8
77ce091
* Wed Sep 08 2010 Lev Shamardin <shamardin@gmail.com> - 0.9.12-1
77ce091
- Updated to version 0.9.12.
77ce091
3b5e46c
* Wed Jul 28 2010 Lev Shamardin <shamardin@gmail.com> - 0.9.9-1
3b5e46c
- Updated to version 0.9.9.
3b5e46c
c8b866b
* Wed Apr 14 2010 Lev Shamardin <shamardin@gmail.com> - 0.9.7-1
c8b866b
- Initial package version.