3 # - consider init script / systemd job (uid/gid celery 274 used to be used)
4 # NOTE: this must not be included and enabled by default in the default
5 # package! Real-life deployments will mostly be application-specific.
8 %bcond_with doc # Sphinx documentation (too much dependencies to be worth the trouble)
9 %bcond_with tests # run tests (broken)
10 %bcond_without python2 # CPython 2.x module
11 %bcond_with python3 # CPython 3.x module (built from python3-celery.spec)
12 %bcond_with python3_default # Use Python 3.x for celery executables
14 %if %{without python3}
15 %undefine python3_default
19 Summary: Celery - Distributed Task Query
20 Summary(pl.UTF-8): Celery - rozproszona kolejka zadań
21 Name: python-%{module}
22 # keep 4.x here for python2 support
26 Group: Development/Languages/Python
27 #Source0Download: https://pypi.org/simple/celery/
28 Source0: https://files.pythonhosted.org/packages/source/c/celery/%{module}-%{version}.tar.gz
29 # Source0-md5: 62906067bd50c4e7e97f0b27f44f6bac
30 Patch0: pytz_dependency.patch
31 URL: http://celeryproject.org/
33 BuildRequires: python-modules >= 1:2.7
34 BuildRequires: python-setuptools
36 BuildRequires: python-billiard >= 3.6.3.0
37 BuildRequires: python-billiard < 4
38 BuildRequires: python-boto3 >= 1.9.178
39 BuildRequires: python-case >= 1.3.1
40 BuildRequires: python-dateutil >= 2.1
41 BuildRequires: python-kombu >= 4.6.10
42 BuildRequires: python-kombu < 4.7
43 BuildRequires: python-mock >= 1.0.1
44 BuildRequires: python-moto >= 1.3.7
45 BuildRequires: python-pytest >= 4.6
46 BuildRequires: python-pytz
47 BuildRequires: python-vine >= 1.3.0
48 BuildRequires: python-vine < 5
52 BuildRequires: python3-modules >= 1:3.5
53 BuildRequires: python3-setuptools
55 BuildRequires: python3-Sphinx >= 2
56 BuildRequires: python3-billiard >= 3.6.3.0
57 BuildRequires: python3-billiard < 4
58 BuildRequires: python3-boto3 >= 1.9.178
59 BuildRequires: python3-case >= 1.3.1
60 BuildRequires: python3-dateutil >= 2.1
61 BuildRequires: python3-kombu >= 4.6.10
62 BuildRequires: python3-kombu < 4.7
63 BuildRequires: python3-mock >= 1.0.1
64 BuildRequires: python3-moto >= 1.3.7
65 BuildRequires: python3-pytest >= 4.6
66 BuildRequires: python3-pytz
67 BuildRequires: python3-sphinx_testing
68 BuildRequires: python3-vine >= 1.3.0
69 BuildRequires: python3-vine < 5
72 BuildRequires: rpm-pythonprov
73 BuildRequires: rpmbuild(macros) >= 1.714
74 BuildRequires: sed >= 4.0
76 BuildRequires: python3-billiard
77 BuildRequires: python3-django
78 BuildRequires: python3-kombu
79 BuildRequires: python3-pytz
80 BuildRequires: python3-sphinx_celery >= 2.0.0
81 BuildRequires: python3-sphinxcontrib-issuetracker
82 BuildRequires: python3-vine >= 1.3.0
83 BuildRequires: python3-vine < 5
84 BuildRequires: sphinx-pdg-3 >= 2
87 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
90 Celery is an asynchronous task queue/job queue based on distributed
91 message passing. It is focused on real-time operation, but supports
94 %description -l pl.UTF-8
95 Celery to asynchroniczna kolejka zadań oparta na rozproszonym
96 przekazywaniu komunikatów. Skupia się na działaniu w czasie
97 rzeczywistym, ale obsługuje też szeregowanie.
99 %package -n python3-%{module}
100 Summary: Celery - Distributed Task Query
101 Summary(pl.UTF-8): Celery - rozproszona kolejka zadań
102 Group: Development/Languages/Python
104 %description -n python3-%{module}
105 Celery is an asynchronous task queue/job queue based on distributed
106 message passing. It is focused on real-time operation, but supports
109 %description -n python3-%{module} -l pl.UTF-8
110 Celery to asynchroniczna kolejka zadań oparta na rozproszonym
111 przekazywaniu komunikatów. Skupia się na działaniu w czasie
112 rzeczywistym, ale obsługuje też szeregowanie.
115 Summary: Celery - Distributed Task Query
116 Summary(pl.UTF-8): Celery - rozproszona kolejka zadań
117 Group: Development/Languages/Python
118 %if %{with python3_default}
119 Requires: python3-%{module} = %{version}
121 Requires: python-%{module} = %{version}
124 %description -n celery
125 Celery is an asynchronous task queue/job queue based on distributed
126 message passing. It is focused on real-time operation, but supports
129 %description -n celery -l pl.UTF-8
130 Celery to asynchroniczna kolejka zadań oparta na rozproszonym
131 przekazywaniu komunikatów. Skupia się na działaniu w czasie
132 rzeczywistym, ale obsługuje też szeregowanie.
135 Summary: API documentation for Celery
136 Summary(pl.UTF-8): Dokumentacja API Celery
138 Obsoletes: python3-celery-apidocs < 4.4.7
141 API documentation for Celery.
143 %description apidocs -l pl.UTF-8
144 Dokumentacja API Celery.
147 %setup -q -n %{module}-%{version}
155 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
156 PYTEST_PLUGINS=case.pytest \
157 %{__python} -m pytest t/unit -k 'not test_sphinx' -vv
158 # celery.contrib.sphinx expects Sphinx 2+
166 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
167 PYTEST_PLUGINS=case.pytest \
168 %{__python3} -m pytest t/unit
173 %{__make} -C docs html \
174 SPHINXBUILD=sphinx-build-3
178 rm -rf $RPM_BUILD_ROOT
183 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{celery,celery-2}
185 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
186 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
187 find $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -name '*.py' \
188 | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
196 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{celery,celery-3}
198 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
199 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
200 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
201 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
203 %if %{with python3_default}
204 ln -sf celery-3 $RPM_BUILD_ROOT%{_bindir}/celery
208 %if %{without python3_default}
209 ln -sf celery-2 $RPM_BUILD_ROOT%{_bindir}/celery
213 rm -rf $RPM_BUILD_ROOT
217 %defattr(644,root,root,755)
218 %doc CONTRIBUTORS.txt Changelog.rst LICENSE README.rst TODO extra/{generic-init.d,supervisord,systemd}
219 %attr(755,root,root) %{_bindir}/celery-2
220 %{py_sitescriptdir}/%{module}
221 %{py_sitescriptdir}/celery-%{version}-py*.egg-info
222 %{_examplesdir}/%{name}-%{version}
226 %files -n python3-%{module}
227 %defattr(644,root,root,755)
228 %doc CONTRIBUTORS.txt Changelog.rst LICENSE README.rst TODO extra/{generic-init.d,supervisord,systemd}
229 %attr(755,root,root) %{_bindir}/celery-3
230 %{py3_sitescriptdir}/%{module}
231 %{py3_sitescriptdir}/celery-%{version}-py*.egg-info
232 %{_examplesdir}/python3-%{module}-%{version}
237 %defattr(644,root,root,755)
238 %doc docs/.build2/html/*
242 %defattr(644,root,root,755)
243 %attr(755,root,root) %{_bindir}/celery