File python-celery.spec of Package python-celery

%global with_python3 1

Name:           python-celery
Version:        4.1.0
Release:        1%{?dist}
BuildArch:      noarch

License:        BSD
URL:            http://celeryproject.org
Source0:        https://github.com/celery/celery/archive/v%{version}/%{name}-%{version}.tar.gz
Summary:        Distributed Task Queue

BuildRequires:  python2-devel
BuildRequires:  python2-setuptools

%description
An open source asynchronous task queue/job queue based on
distributed message passing. It is focused on real-time
operation, but supports scheduling as well.

The execution units, called tasks, are executed concurrently
on one or more worker nodes using multiprocessing, Eventlet
or gevent. Tasks can execute asynchronously (in the background)
or synchronously (wait until ready).

Celery is used in production systems to process millions of
tasks a day.

Celery is written in Python, but the protocol can be implemented
in any language. It can also operate with other languages using
web hooks.

The recommended message broker is RabbitMQ, but limited support
for Redis, Beanstalk, MongoDB, CouchDB and databases
(using SQLAlchemy or the Django ORM) is also available.


%package -n python2-celery
Summary:        Distributed Task Queue

%{?python_provide:%python_provide python2-celery}

Requires:       python2-billiard >= 3.5.0.2
Requires:       python2-kombu >= 4.0.2
Requires:       python2-setuptools
Requires:       pytz

%description -n python2-celery
An open source asynchronous task queue/job queue based on
distributed message passing. It is focused on real-time
operation, but supports scheduling as well.

The execution units, called tasks, are executed concurrently
on one or more worker nodes using multiprocessing, Eventlet
or gevent. Tasks can execute asynchronously (in the background)
or synchronously (wait until ready).

Celery is used in production systems to process millions of
tasks a day.

Celery is written in Python, but the protocol can be implemented
in any language. It can also operate with other languages using
web hooks.

The recommended message broker is RabbitMQ, but limited support
for Redis, Beanstalk, MongoDB, CouchDB and databases
(using SQLAlchemy or the Django ORM) is also available.

%if 0%{?with_python3}
%package -n python3-celery
Summary:        Distributed Task Queue

%{?python_provide:%python_provide python3-celery}

Requires:       python3-billiard >= 3.3.0.22
Requires:       python3-kombu >= 3.0.33
Requires:       python3-pytz
Requires:       python3-setuptools

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools


%description -n python3-celery
An open source asynchronous task queue/job queue based on
distributed message passing. It is focused on real-time
operation, but supports scheduling as well.

The execution units, called tasks, are executed concurrently
on one or more worker nodes using multiprocessing, Eventlet
or gevent. Tasks can execute asynchronously (in the background)
or synchronously (wait until ready).

Celery is used in production systems to process millions of
tasks a day.

Celery is written in Python, but the protocol can be implemented
in any language. It can also operate with other languages using
web hooks.

The recommended message broker is RabbitMQ, but limited support
for Redis, Beanstalk, MongoDB, CouchDB and databases
(using SQLAlchemy or the Django ORM) is also available.

%endif

%prep
%autosetup -n celery-%{version}

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

%install
%if 0%{?with_python3}
%py3_install
pushd %{buildroot}%{_bindir}
mv celery celery-3
ln -s celery-3 celery-%{python3_version}
popd
%endif

%py2_install
pushd %{buildroot}%{_bindir}
ln -s celery celery-2
ln -s celery-2 celery-%{python2_version}
popd

%files -n python2-celery
%license LICENSE
%doc README.rst TODO CONTRIBUTORS.txt examples
%{_bindir}/celery
%{_bindir}/celery-2*
%{python2_sitelib}/celery-*.egg-info
%{python2_sitelib}/celery

%if 0%{?with_python3}
%files -n python3-celery
%license LICENSE
%doc README.rst TODO CONTRIBUTORS.txt examples
%{_bindir}/celery-3*
%{python3_sitelib}/celery-*.egg-info
%{python3_sitelib}/celery
%endif

%changelog
* Wed Jan 17 2018 Yunfei Shi <shiyf2@lenovo.com> - 4.1.0-1
- Initial package
openSUSE Build Service is sponsored by