File python-librabbitmq.spec of Package python-librabbitmq

#
# spec file for package python-librabbitmq
#
# 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-librabbitmq
Version:        1.0.3
Release:        0
Summary:        AMQP Client using the rabbitmq-c library
License:        MPL-1.1
Group:          Development/Languages/Python
Url:            http://github.com/celery/librabbitmq
Source:         http://pypi.python.org/packages/source/l/librabbitmq/librabbitmq-%{version}.tar.gz
Patch0:         librabbitmq-fix-implicit-definitions.patch
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Requires:       python-amqplib
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif

%description
Python bindings to the RabbitMQ C-library `rabbitmq-c`_.
Supported by Kombu and Celery.

%prep
%setup -q -n librabbitmq-%{version}
%patch0 -p1

%build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
chmod a+x %{buildroot}/%{python_sitearch}/funtests/setup.py

%files
%defattr(-,root,root,-)
%doc AUTHORS Changelog LICENSE-* README.rst TODO
%{python_sitearch}/_librabbitmq.so
%{python_sitearch}/funtests/
%{python_sitearch}/librabbitmq/
%{python_sitearch}/librabbitmq-%{version}-py*.egg-info/

%changelog
openSUSE Build Service is sponsored by