From 3648e97c4e32eeb795316d4f9d364648feff8d95 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Sun, 9 Jul 2017 21:29:59 -0700 Subject: + python3-greenlet for epel7 --- python/python3-greenlet.spec | 88 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 python/python3-greenlet.spec diff --git a/python/python3-greenlet.spec b/python/python3-greenlet.spec new file mode 100644 index 0000000..814dc6f --- /dev/null +++ b/python/python3-greenlet.spec @@ -0,0 +1,88 @@ +# 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.11 +Release: 1%{?dist} +Summary: Lightweight in-process concurrent programming +Group: Development/Libraries +License: MIT +URL: http://pypi.python.org/pypi/%{modname} +Source0: https://github.com/python-greenlet/greenlet/archive/%{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}-%{modname} = %{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-*.so +%{python3_sitearch}/greenlet*.egg-info + +%files -n python%{python3_pkgversion}-greenlet-devel +%license LICENSE LICENSE.PSF +%doc AUTHORS NEWS README.rst +%{_includedir}/python3*/greenlet + +%changelog +* Sun Jul 09 2017 Michel Alexandre Salim - 0.4.11-1 +- Initial el7 package, based on python-greenlet-0.4.11-3 -- cgit