File python-amqp.spec of Package python-amqp
#
# spec file for package python-amqp
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
Name: python-amqp
Version: 1.4.9
Release: 0
Summary: Low-level AMQP client for Python (fork of amqplib)
License: LGPL-2.1-or-later
Group: Development/Languages/Python
Url: http://github.com/celery/py-amqp
Source: https://pypi.python.org/packages/source/a/amqp/amqp-%{version}.tar.gz
Source99: %{name}.changes
# PATCH-FIX-OPENSUSE speilicke@suse.com -- Avoid excessive doc dependencies
Patch0: amqp-drop-sphinxcontrib-issuetracker-dependency.patch
Patch1: tune-keepalive-intervals.diff
Patch2: avoid-fail-on-reconnect.patch
BuildRequires: python-devel
BuildRequires: python-setuptools
# Documentation requirements:
BuildRequires: python-Sphinx
# Test requirements:
BuildRequires: python-mock
BuildRequires: python-nose
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires: python-unittest2
%endif
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 is a fork of amqplib_ which was originally written by Barry Pederson.
It is maintained by the Celery_ project, and used by kombu as a pure python
alternative when librabbitmq is not available.
This library should be API compatible with librabbitmq.
%prep
%setup -q -n amqp-%{version}
%patch0 -p1
%patch1 -p0
%patch2 -p1
# hack, or sphinx will put today's date into the HTML files
DOCDATE="`date +"%B %e, %Y" -r %{S:99}`"
echo "today = '$DOCDATE'" >> docs/conf.py
%build
python setup.py build
python setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%check
nosetests
%files
%defattr(-,root,root,-)
%doc Changelog LICENSE README.rst demo build/sphinx/html
%{python_sitelib}/*
%changelog