# sitelib for noarch packages, sitearch for others (remove the unneeded one) %if 0%{?fedora} > 12 || 0%{?rhel} > 6 %global _with_python3 1 %else %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %endif Name: python-decorator Version: 3.2.0 Release: 1%{?dist} Summary: Module to simplify usage of decorators Group: Development/Languages License: BSD URL: http://www.phyast.pitt.edu/~micheles/python/documentation.html Source0: http://pypi.python.org/packages/source/d/decorator/decorator-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python2-devel %if 0%{?fedora} && 0%{?fedora} < 13 BuildRequires: python-setuptools-devel %else BuildRequires: python-setuptools %endif BuildRequires: python-nose %description The aim of the decorator module is to simplify the usage of decorators for the average programmer, and to popularize decorators usage giving examples of useful decorators, such as memoize, tracing, redirecting_stdout, locked, etc. The core of this module is a decorator factory called decorator. %prep %setup -q -n decorator-%{version} chmod a-x *.txt *.py %{__sed} -i 's/\r//' README.txt %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %check # Until we get the python-multiprocessing backport packaged %if 0%{?fedora} >= 11 || 0%{?rhel} > 5 nosetests --with-doctest -e documentation3 %endif %files %defattr(-,root,root,-) %doc *.txt %{python_sitelib}/* %changelog * Wed Jun 30 2010 Toshio Kuratomi - 3.2.0-1 - Minor cleanups - Upgrade to 3.2.0 * Tue Oct 6 2009 Toshio Kuratomi - 3.1.2-2 - Really include the new source tarball * Tue Oct 6 2009 Toshio Kuratomi - 3.1.2-1 - Update to upstream release 3.1.2 * Sun Jul 26 2009 Fedora Release Engineering - 3.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Sun May 31 2009 Luke Macken - 3.0.1-2 - Only run the test suite on Fedora 11, which has Py2.6 and the multiprocessing module. We can disable this once the compat module is packaged for F10 and below. * Thu May 21 2009 Toshio Kuratomi - 3.0.1-1 - Update to upstream release 3.0.1. * Thu Feb 26 2009 Fedora Release Engineering - 2.3.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Jan 21 2009 Toshio Kuratomi - 2.3.2-1 - Update to 2.3.2 - Enable tests via nose * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 2.2.0-2 - Rebuild for Python 2.6