2008-12-03 01:04:41 +00:00
|
|
|
%define modname decorator
|
|
|
|
|
Name: python-%{modname}
|
|
|
|
|
Version: 2.3.2
|
|
|
|
|
Release: 1
|
|
|
|
|
Summary: Better Living Through Python With Decorators
|
|
|
|
|
URL: http://www.phyast.pitt.edu/~micheles/python/documentation.html
|
|
|
|
|
License: BSD
|
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
|
Source: %{modname}-%{version}.tar.bz2
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-buildroot
|
|
|
|
|
%{py_requires}
|
|
|
|
|
BuildRequires: python-devel
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
As of now, writing custom decorators correctly requires some experience and it
|
|
|
|
|
is not as easy as it could be. For instance, typical implementations of
|
|
|
|
|
decorators involve nested functions, and we all know that flat is better than
|
|
|
|
|
nested. Moreover, typical implementations of decorators do not preserve the
|
|
|
|
|
signature of decorated functions, thus confusing both documentation tools and
|
|
|
|
|
developers.
|
|
|
|
|
|
|
|
|
|
The aim of the decorator module it 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.
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
|
--------
|
|
|
|
|
Michele Simionato <michele.simionato@gmail.com>
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{modname}-%{version}
|
2008-12-03 02:41:13 +00:00
|
|
|
# Remove executable bits from doc files
|
|
|
|
|
chmod -x *
|
2008-12-03 01:04:41 +00:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
|
python setup.py build
|
|
|
|
|
|
|
|
|
|
%install
|
2008-12-03 02:23:21 +00:00
|
|
|
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES
|
2008-12-03 01:04:41 +00:00
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
|
%files -f INSTALLED_FILES
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc CHANGES.txt README.txt corner-cases.txt documentation.txt other.txt util.py
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
|
|
|
|
|
* Tue Dec 02 2008 - James Oakley <jfunk@funktronics.ca> - 2.3.2-1
|
|
|
|
|
- Initial release
|