%global modname greenlet %global __python3 /usr/bin/python3.11 %global python3_pkgversion 3.11 Name: python-%{modname} Version: 1.1.2 Release: 5%{?dist} Summary: Lightweight in-process concurrent programming License: MIT URL: https://github.com/python-greenlet/greenlet Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz # Python 3.11 support, backported from 2.0.0a2 # https://github.com/python-greenlet/greenlet/commit/fd0b68ab406a0dfe3d6d0d8c9d17354356f53da0 # https://github.com/python-greenlet/greenlet/commit/63e1099acc3677e614532bea0fa2e1967b69125f # https://github.com/python-greenlet/greenlet/commit/5ed467e5cb34651cc013c286158d0b6d7ff0a26a # Proposed upstream via https://github.com/python-greenlet/greenlet/pull/306 Patch: https://github.com/python-greenlet/greenlet/pull/306.patch BuildRequires: gcc-c++ %global _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". %description %{_description} %package -n python%{python3_pkgversion}-%{modname} Summary: %{summary} %{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %description -n python%{python3_pkgversion}-%{modname} %{_description} Python 3 version. %package -n python%{python3_pkgversion}-%{modname}-devel Summary: C development headers for python%{python3_pkgversion}-%{modname} %{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}-devel} Requires: python%{python3_pkgversion}-%{modname}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description -n python%{python3_pkgversion}-%{modname}-devel %{summary}. Python 3 version. %prep %autosetup -n %{modname}-%{version} -p1 %build %py3_build %install %py3_install %check PYTHONPATH="%{buildroot}%{python3_sitearch}" %{python3} -m unittest discover greenlet.tests %files -n python%{python3_pkgversion}-%{modname} %license LICENSE LICENSE.PSF %doc AUTHORS README.rst %{python3_sitearch}/%{modname}-*.egg-info %{python3_sitearch}/%{modname} %files -n python%{python3_pkgversion}-greenlet-devel %{_includedir}/python%{python3_version}*/%{modname}/ %changelog