%global modname toro Name: python-%{modname} Version: 1.0.1 Release: 1%{?dist} Summary: Synchronization primitives for Tornado coroutines License: ASL 2.0 URL: https://github.com/ajdavis/toro Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz BuildArch: noarch %global _description \ Toro provides to Tornado coroutines a set of locking primitives and queues\ analogous to those that Gevent provides to Greenlets, or that the standard\ library provides to threads. %description %{_description} %package -n python2-%{modname} Summary: %{summary} %{?python_provide:%python_provide python2-%{modname}} BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-tornado Requires: python2-tornado %description -n python2-%{modname} %{_description} Python 2 version. %package -n python3-%{modname} Summary: %{summary} %{?python_provide:%python_provide python3-%{modname}} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-tornado Requires: python3-tornado %description -n python3-%{modname} %{_description} Python 3 version. %prep %autosetup -n %{modname}-%{version} -c mv %{modname}-%{version} python2 cp -a python2 python3 cp -a python2/{LICENSE,README.rst} . %build pushd python2 %py2_build popd pushd python3 %py3_build popd %install pushd python2 %py2_install popd pushd python3 %py3_install popd %check pushd python2 %{__python2} setup.py test popd pushd python3 %{__python3} setup.py test popd %files -n python2-%{modname} %license LICENSE %doc README.rst %{python2_sitelib}/%{modname}-*.egg-info/ %{python2_sitelib}/%{modname}/ %files -n python3-%{modname} %license LICENSE %doc README.rst %{python3_sitelib}/%{modname}-*.egg-info/ %{python3_sitelib}/%{modname}/ %changelog * Sat Sep 03 2016 Igor Gnatenko - 1.0.1-1 - Initial package