# Python 3 version of greenlet for EPEL # python-greenlet is retired in epel7 since it is in # rhel7-extras -- see rhbz#1108884 # but rhel7-extras only contains the Python 2 version %global modname greenlet # Allow SRPM to be built on Fedora, where python3_pkgversion == 3 %{?fedora:%global python3_pkgversion 34} Name: python3-%{modname} Version: 0.4.12 Release: 1%{?dist} Summary: Lightweight in-process concurrent programming Group: Development/Libraries License: MIT and Python URL: http://pypi.python.org/pypi/%{modname} Source0: https://github.com/python-greenlet/greenlet/archive/%{version}.tar.gz#/%{modname}-%{version}.tar.gz BuildRequires: python-tools BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}} %description The greenlet package is a spin-off of Stackless, a version of CPython that supports micro-threads called "tasklets". Tasklets run pseudo-concurrently (typically in a single or a few OS-level threads) and are synchronized with data exchanges on "channels". %package -n python%{python3_pkgversion}-%{modname} Summary: %{summary} %{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}} Group: Development/Libraries %description -n python%{python3_pkgversion}-%{modname} The greenlet package is a spin-off of Stackless, a version of CPython that supports micro-threads called "tasklets". Tasklets run pseudo-concurrently (typically in a single or a few OS-level threads) and are synchronized with data exchanges on "channels". This is the Python 3 version of greenlet. %package -n python%{python3_pkgversion}-greenlet-devel Summary: C development headers for python%{python3_pkgversion}-greenlet %{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}-devel} Group: Development/Libraries Requires: python%{python3_pkgversion}-libs Requires: python%{python3_pkgversion}-%{modname}%{?_isa} = %{version}-%{release} %description -n python%{python3_pkgversion}-%{modname}-devel This package contains header files required for C modules development. %prep %setup -q -n greenlet-%{version} chmod 644 benchmarks/*.py # fix shebang for f in benchmarks/chain.py; do sed -i.orig 's|#!/usr/bin/env python|#!/usr/bin/python3|' $f touch -r $f.orig $f rm $f.orig done %build %py3_build %install %py3_install %check # Run the upstream test suite and benchmarking suite to further exercise the code %{__python3} setup.py test || : 2to3 -w --no-diffs -n benchmarks/chain.py PYTHONPATH=$(pwd) %{__python3} benchmarks/chain.py %files -n python%{python3_pkgversion}-greenlet %license LICENSE LICENSE.PSF %doc AUTHORS NEWS README.rst %doc doc/greenlet.txt benchmarks %{python3_sitearch}/greenlet.cpython-%{python3_version_nodots}m.so %{python3_sitearch}/greenlet-%{version}-py%{python3_version}.egg-info %files -n python%{python3_pkgversion}-greenlet-devel %license LICENSE LICENSE.PSF %doc AUTHORS NEWS README.rst %{_includedir}/python%{python3_version}m/greenlet %changelog * Sun Jul 09 2017 Michel Alexandre Salim - 0.4.11-1 - Initial el7 package, based on python-greenlet-0.4.11-3