15
0
Files
python-decorator/python-decorator.spec
Dirk Mueller 3b35b67f01 Accepting request 515732 from home:tbechtold:branches:devel:languages:python
- update to 4.1.2:
  * Made it possible to define decorators converting coroutines into regular
    functions.
  * Changed the documentation build system to sphinx and uploaded the docs
    on readthedocs.org.
  * Support for Python 3.5 coroutines defined with `async def`, thanks to
    Victor-Nicolae Savu who raised the issue of `iscoroutinefunction` not
    giving the right answer for coroutines decorated with the decorator module.

OBS-URL: https://build.opensuse.org/request/show/515732
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-decorator?expand=0&rev=31
2017-08-09 16:49:30 +00:00

66 lines
2.4 KiB
RPMSpec

#
# spec file for package python-decorator
#
# Copyright (c) 2017 SUSE LINUX 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-decorator
Version: 4.1.2
Release: 0
Url: http://pypi.python.org/pypi/decorator
Summary: Better living through Python with decorators
License: BSD-2-Clause
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/d/decorator/decorator-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
BuildArch: noarch
%python_subpackages
%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
%setup -q -n decorator-%{version}
sed -i 's/\r//' docs/README.rst # Fix EOL encoding
%build
%python_build
%install
%python_install
%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGES.md LICENSE.txt docs/README.rst
%{python_sitelib}/decorator.py*
%pycache_only %{python_sitelib}/__pycache__/decorator.*.py*
%{python_sitelib}/decorator-%{version}-py*.egg-info
%changelog