Blame SPECS/python-gevent.spec

f73de9
%global __provides_exclude_from ^%{python2_sitearch}/.*\\.so$ ^%{python3_sitearch}/.*\\.so$
f73de9
%global modname gevent
f73de9
%global optflags %(echo %{optflags} -I%{_includedir}/libev)
f73de9
f73de9
%if 0%{?rhel} > 7
f73de9
# Disable python2 build by default
f73de9
%bcond_with python2
f73de9
%else
f73de9
%bcond_without python2
f73de9
%endif
f73de9
f73de9
Name:          python-%{modname}
f73de9
Version:       1.2.2
f73de9
Release:       3%{?dist}
f73de9
Summary:       A coroutine-based Python networking library
f73de9
f73de9
License:       MIT
f73de9
URL:           http://www.gevent.org/
f73de9
Source0:       https://files.pythonhosted.org/packages/source/g/%{modname}/%{modname}-%{version}.tar.gz
f73de9
f73de9
# https://github.com/gevent/gevent/pull/979
f73de9
Patch1:        0001-always-obey-GEVENT_NO_CFFI_BUILD.patch
f73de9
f73de9
BuildRequires: c-ares-devel
f73de9
BuildRequires: libev-devel
f73de9
f73de9
%description
f73de9
gevent is a coroutine-based Python networking library that uses greenlet to
f73de9
provide a high-level synchronous API on top of libevent event loop.
f73de9
f73de9
Features include:
f73de9
f73de9
  * convenient API around greenlets
f73de9
  * familiar synchronization primitives (gevent.event, gevent.queue)
f73de9
  * socket module that cooperates
f73de9
  * WSGI server on top of libevent-http
f73de9
  * DNS requests done through libevent-dns
f73de9
  * monkey patching utility to get pure Python modules to cooperate
f73de9
f73de9
%if %{with python2}
f73de9
%package -n python2-%{modname}
f73de9
Summary:       %{summary}
f73de9
%{?python_provide:%python_provide python2-%{modname}}
f73de9
BuildRequires: python2-devel
f73de9
Requires:      python2-greenlet
f73de9
f73de9
%description -n python2-%{modname}
f73de9
gevent is a coroutine-based Python networking library that uses greenlet to
f73de9
provide a high-level synchronous API on top of libevent event loop.
f73de9
f73de9
Features include:
f73de9
f73de9
  * convenient API around greenlets
f73de9
  * familiar synchronization primitives (gevent.event, gevent.queue)
f73de9
  * socket module that cooperates
f73de9
  * WSGI server on top of libevent-http
f73de9
  * DNS requests done through libevent-dns
f73de9
  * monkey patching utility to get pure Python modules to cooperate
f73de9
f73de9
Python 2 version.
f73de9
%endif # with python2
f73de9
f73de9
%package -n python3-%{modname}
f73de9
Summary:       %{summary}
f73de9
%{?python_provide:%python_provide python3-%{modname}}
f73de9
BuildRequires: python3-devel
f73de9
Requires:      python3-greenlet
f73de9
f73de9
%description -n python3-%{modname}
f73de9
gevent is a coroutine-based Python networking library that uses greenlet to
f73de9
provide a high-level synchronous API on top of libevent event loop.
f73de9
f73de9
Features include:
f73de9
f73de9
  * convenient API around greenlets
f73de9
  * familiar synchronization primitives (gevent.event, gevent.queue)
f73de9
  * socket module that cooperates
f73de9
  * WSGI server on top of libevent-http
f73de9
  * DNS requests done through libevent-dns
f73de9
  * monkey patching utility to get pure Python modules to cooperate
f73de9
f73de9
Python 3 version.
f73de9
f73de9
%prep
f73de9
%autosetup -n %{modname}-%{version}
f73de9
# Remove bundled libraries
f73de9
rm -r deps
f73de9
# Upstream intentionally includes C extension sources in the built package, 
f73de9
# because... reasons (PyPy I think?) however we do not want that. Sources will 
f73de9
# go into debuginfo as normal.
f73de9
sed -i -e 's/include_package_data=True/include_package_data=False/' setup.py
f73de9
f73de9
%build
f73de9
export LIBEV_EMBED=0
f73de9
export CARES_EMBED=0
f73de9
export GEVENT_NO_CFFI_BUILD=1
f73de9
%if %{with python2}
f73de9
%py2_build
f73de9
%endif # with python2
f73de9
%py3_build
f73de9
f73de9
%install
f73de9
export LIBEV_EMBED=0
f73de9
export CARES_EMBED=0
f73de9
export GEVENT_NO_CFFI_BUILD=1
f73de9
%if %{with python2}
f73de9
%py2_install
f73de9
%endif # with python2
f73de9
%py3_install
f73de9
%if %{with python2}
f73de9
rm %{buildroot}%{python2_sitearch}/%{modname}/_*3.py*
f73de9
%endif # with python2
f73de9
rm %{buildroot}%{python3_sitearch}/%{modname}/_*2.py
f73de9
rm %{buildroot}%{python3_sitearch}/%{modname}/__pycache__/_*2.*
f73de9
find %{buildroot} -name '.buildinfo' -delete
f73de9
# Correct the permissions.
f73de9
find %{buildroot} -name '*.so' -exec chmod 755 {} ';'
f73de9
f73de9
%if %{with python2}
f73de9
%files -n python2-%{modname}
f73de9
%license LICENSE
f73de9
%doc README.rst
f73de9
%{python2_sitearch}/%{modname}*
f73de9
%endif # with python2
f73de9
f73de9
%files -n python3-%{modname}
f73de9
%license LICENSE
f73de9
%doc README.rst
f73de9
%{python3_sitearch}/%{modname}*
f73de9
f73de9
%changelog
f73de9
* Wed Jul 18 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.2.2-3
f73de9
- Conditionalize the python2 subpackage
f73de9
f73de9
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.2-2
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f73de9
f73de9
* Wed Aug 09 2017 Dan Callaghan <dcallagh@redhat.com> - 1.2.2-1
f73de9
- Update to 1.2.2 (RHBZ#1389634)
f73de9
f73de9
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-5
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f73de9
f73de9
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-4
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f73de9
f73de9
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-3
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f73de9
f73de9
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.1.2-2
f73de9
- Rebuild for Python 3.6
f73de9
f73de9
* Sun Jul 24 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.1.2-1
f73de9
- Update to 1.1.2 (RHBZ #1359455)
f73de9
f73de9
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-2
f73de9
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
f73de9
f73de9
* Tue Apr 05 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.1.1-1
f73de9
- Update to 1.1.1 (RHBZ #1323855)
f73de9
f73de9
* Tue Mar 15 2016 Dan Callaghan <dcallagh@redhat.com> - 1.1.0-1
f73de9
- Update to 1.1.0 final release
f73de9
f73de9
* Wed Feb 17 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.1-0.8.rc4
f73de9
- Update to 1.1rc4 (RHBZ #1309141)
f73de9
f73de9
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-0.7.rc3
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f73de9
f73de9
* Wed Jan 20 2016 Dan Callaghan <dcallagh@redhat.com> - 1.1-0.6.rc3
f73de9
- Update to 1.1rc3
f73de9
f73de9
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-0.5.b6
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
f73de9
f73de9
* Sat Oct 24 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.1-0.4.b6
f73de9
- Fix description in spec
f73de9
f73de9
* Sun Oct 18 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.1-0.3.b6
f73de9
- Update to 1.1b6 (RHBZ #1272717)
f73de9
f73de9
* Tue Oct 06 2015 Orion Poplawski <orion@cora.nwra.com> - 1.1-0.2.b5
f73de9
- Drop use of unneeded %%{py3dir}
f73de9
f73de9
* Mon Oct 05 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.1-0.1.b5
f73de9
- Update to 1.1b5 (RHBZ #1244452)
f73de9
- Add python3 support
f73de9
- Follow modern RPM packaging guidelines
f73de9
f73de9
* Fri Jun 26 2015 Dan Callaghan <dcallagh@redhat.com> - 1.0.2-2
f73de9
- removed version requirement for greenlet
f73de9
f73de9
* Mon Jun 22 2015 Dan Callaghan <dcallagh@redhat.com> - 1.0.2-1
f73de9
- bug fix release 1.0.2:
f73de9
  https://github.com/gevent/gevent/blob/v1.0.2/changelog.rst#release-102-may-23-2015
f73de9
f73de9
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-3
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f73de9
f73de9
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
f73de9
f73de9
* Fri Aug 15 2014 Orion Poplawski <orion@cora.nwra.com> - 1.0.1-1
f73de9
- Update to 1.0.1
f73de9
f73de9
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f73de9
f73de9
* Wed Jan 22 2014 Orion Poplawski <orion@cora.nwra.com> - 1.0-1
f73de9
- Update to 1.0
f73de9
f73de9
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13.8-3
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f73de9
f73de9
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13.8-2
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
f73de9
f73de9
* Thu Dec 27 2012 Silas Sewell <silas@sewell.org> - 0.13.8-1
f73de9
- Update to 0.13.8
f73de9
f73de9
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13.6-3
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f73de9
f73de9
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13.6-2
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
f73de9
f73de9
* Sun Jul 24 2011 Silas Sewell <silas@sewell.org> - 0.13.6-1
f73de9
- Update to 0.13.6
f73de9
f73de9
* Wed Feb 16 2011 Silas Sewell <silas@sewell.ch> - 0.13.3-1
f73de9
- Update to 0.13.3
f73de9
f73de9
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13.1-2
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f73de9
f73de9
* Sat Oct 09 2010 Silas Sewell <silas@sewell.ch> - 0.13.1-1
f73de9
- Update to 0.13.1
f73de9
f73de9
* Tue Jul 27 2010 David Malcolm <dmalcolm@redhat.com> - 0.13.0-2
f73de9
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
f73de9
f73de9
* Wed Jul 14 2010 Silas Sewell <silas@sewell.ch> - 0.13.0-1
f73de9
- Update to 0.13.0
f73de9
f73de9
* Fri Apr 23 2010 Silas Sewell <silas@sewell.ch> - 0.12.2-2
f73de9
- Remove setuptools requirement
f73de9
f73de9
* Wed Mar 17 2010 Silas Sewell <silas@sewell.ch> - 0.12.2-1
f73de9
- Initial build