Blame SPECS/python-gevent.spec

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