File python-kombu.spec of Package python-kombu

%global with_python3 1

%global srcname kombu

Name:           python-%{srcname}
Version:        4.1.0
Release:        1%{?dist}
Summary:        An AMQP Messaging Framework for Python

# utils/functional.py contains a header that says Python
License:        BSD and Python
URL:            http://kombu.readthedocs.org/
Source0:        https://github.com/celery/kombu/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz

BuildArch: noarch

BuildRequires:  python2-devel
BuildRequires:  python2-setuptools

%description
AMQP is the Advanced Message Queuing Protocol, an open standard protocol
for message orientation, queuing, routing, reliability and security.

One of the most popular implementations of AMQP is RabbitMQ.

The aim of Kombu is to make messaging in Python as easy as possible by
providing an idiomatic high-level interface for the AMQP protocol, and
also provide proven and tested solutions to common messaging problems.

%package -n python2-%{srcname}
Summary:        %{sum}
Requires:       python2-amqp >= 2.1.4

%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
AMQP is the Advanced Message Queuing Protocol, an open standard protocol
for message orientation, queuing, routing, reliability and security.

One of the most popular implementations of AMQP is RabbitMQ.

The aim of Kombu is to make messaging in Python as easy as possible by
providing an idiomatic high-level interface for the AMQP protocol, and
also provide proven and tested solutions to common messaging problems.

%if 0%{?with_python3}
%package -n python3-%{srcname}
Summary:        %{summary}
Requires:       python3-amqp >= 2.1.4

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
AMQP is the Advanced Message Queuing Protocol, an open standard protocol
for message orientation, queuing, routing, reliability and security.

One of the most popular implementations of AMQP is RabbitMQ.

The aim of Kombu is to make messaging in Python as easy as possible by
providing an idiomatic high-level interface for the AMQP protocol, and
also provide proven and tested solutions to common messaging problems.
%endif

%prep
%autosetup -n %{srcname}-%{version} -p1

%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif

%install
%py2_install

%if 0%{?with_python3}
%py3_install
%endif

%files -n python2-%{srcname}
%doc AUTHORS Changelog FAQ READ* THANKS TODO examples/
%license LICENSE
%{python2_sitelib}/%{srcname}
%{python2_sitelib}/%{srcname}*.egg-info

%if 0%{?with_python3}
%files -n python3-%{srcname}
%doc AUTHORS Changelog FAQ READ* THANKS TODO examples/
%license LICENSE
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/kombu-%{version}-py%{python3_version}.egg-info
%endif

%changelog
* Wed Jan 17 2018 Yunfei Shi <shiyf2@lenovo.com> - 4.1.0-1
- Initial package.

openSUSE Build Service is sponsored by