File python-prioritized_methods.spec of Package python-prioritized_methods
#
# spec file for package python-prioritized_methods
#
# Copyright (c) 2013 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python-prioritized_methods
Version: 0.2.2dev_20110830
Release: 0
Summary: Prioritize methods to avoid AmbiguousMethods situations
License: MIT
Group: Development/Libraries/Python
Url: http://pypi.python.org/pypi/prioritized_methods
Source: prioritized_methods-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-setuptools
Requires: python-PEAK-Rules
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%description
This module provides four decorators:
prioritized_when, prioritized_around, prioritized_before, prioritized_after
These behave like their peak.rules counterparts except that they accept an
optional prio argument which can be used to provide a comparable object
(usually an integer) that will be used to disambiguate situations in which more
than rule applies to the given arguments and no rule is more specific than
another. That is, situations in which an peak.rules.AmbiguousMethods would
have been raised.
%prep
%setup -q -n prioritized_methods-0.2.2dev-20110830
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%files
%defattr(-,root,root)
%{python_sitelib}/*
%changelog