%global pypi_name PyDispatcher %global srcname pydispatcher Name: python-%{srcname} Version: 2.0.5 Release: 1%{?dist} Summary: Multi-producer-multi-consumer signal dispatching mechanism License: BSD URL: http://pydispatcher.sourceforge.net Source0: https://files.pythonhosted.org/packages/source/P/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python3-devel BuildRequires: python3-setuptools %global _description Dispatcher mechanism for creating event models. \ PyDispatcher is an enhanced version of Patrick K. O'Brien's original \ dispatcher.py module. It provides the Python programmer with a robust \ mechanism for event routing within various application contexts. \ Included in the package are the `robustapply` and `saferef` modules, \ which provide the ability to selectively apply arguments to callable \ objects and to reference instance methods using weak-references. %description %{_description} %package -n python2-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} %{_description} This package contains the Python 2 version of %{pypi_name}. %package -n python3-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} %{_description} This package contains the Python 3 version of %{pypi_name}. %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %py3_build %install %py2_install %py3_install %check %{__python2} setup.py test -s tests %{__python3} setup.py test -s tests %files -n python2-%{srcname} %license license.txt %doc PKG-INFO %{python2_sitelib}/pydispatch %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python3-%{srcname} %license license.txt %doc PKG-INFO %{python3_sitelib}/pydispatch %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog * Wed Apr 05 2017 Iryna Shcherbina - 2.0.5-1 - Initial package.