# Created by pyp2rpm-1.0.1
%global pypi_name singledispatch
%{!?__python2:%global __python2 %{__python}}
Name: python-%{pypi_name}
Version: 3.4.0.2
Release: 3%{?dist}
Summary: This library brings functools.singledispatch from Python 3.4 to Python 2.6-3.3
License: MIT
URL: http://docs.python.org/3/library/functools.html#functools.singledispatch
Source0: https://pypi.python.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-six
Requires: python-six
%if 0%{?rhel} == 6
Requires: python-ordereddict
BuildRequires: python-ordereddict
%endif
%description
PEP 443 proposed to expose a mechanism in the functools standard library
module in Python 3.4 that provides a simple form of generic programming
known as single-dispatch generic functions.
This library is a backport of this functionality to Python 2.6 - 3.3.
%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
# remove /usr/bin/env python from scripts
sed -i '1d' singledispatch.py
sed -i '1d' singledispatch_helpers.py
%build
%{__python2} setup.py build
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
%check
%{__python2} setup.py test
%files
%doc README.rst
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%{python_sitelib}/%{pypi_name}.py*
%{python_sitelib}/%{pypi_name}_helpers.py*
%changelog
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue Mar 18 2014 Matthias Runge <mrunge@redhat.com> - 3.4.0.2-2
- add support for epel6
* Tue Mar 18 2014 Matthias Runge <mrunge@redhat.com> - 3.4.0.2-1
- Initial package.