2011-09-01 09:59:03 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-decorator
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
2011-11-25 12:40:51 +00:00
|
|
|
|
2011-09-01 09:59:03 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
2011-11-25 12:40:51 +00:00
|
|
|
|
|
|
|
|
|
2011-09-01 09:59:03 +00:00
|
|
|
Name: python-decorator
|
|
|
|
|
Version: 3.3.2
|
|
|
|
|
Release: 0
|
|
|
|
|
Url: http://pypi.python.org/pypi/decorator
|
|
|
|
|
Summary: Better living through Python with decorators
|
|
|
|
|
License: BSD License
|
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
|
Source: http://pypi.python.org/packages/source/d/decorator/decorator-%{version}.tar.gz
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2008-12-03 01:04:41 +00:00
|
|
|
BuildRequires: python-devel
|
2011-09-26 07:57:44 +00:00
|
|
|
BuildRequires: python-distribute
|
2009-08-10 14:47:54 +00:00
|
|
|
BuildRequires: python-nose
|
2011-09-01 09:59:03 +00:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
%py_requires
|
|
|
|
|
%if 0%{?suse_version} > 1110
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
2008-12-03 01:04:41 +00:00
|
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
|
|
%prep
|
2011-09-01 09:59:03 +00:00
|
|
|
%setup -q -n decorator-%{version}
|
|
|
|
|
sed -i 's/\r//' README.txt # Fix EOL encoding
|
2008-12-03 01:04:41 +00:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
python setup.py build
|
|
|
|
|
|
|
|
|
|
%install
|
2011-09-01 09:59:03 +00:00
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2008-12-03 01:04:41 +00:00
|
|
|
|
2011-09-01 09:59:03 +00:00
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc README.txt
|
|
|
|
|
%{python_sitelib}/*
|
2008-12-03 01:04:41 +00:00
|
|
|
|
|
|
|
|
%changelog
|