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_without doc # don't build doc
9 %bcond_with tests # run tests (broken)
10 %bcond_without python2 # CPython 2.x module
11 %bcond_without python3 # CPython 3.x module
12 %bcond_without python3_default # Use Python 3.x for celery executables
14 %if %{without python3}
15 %undefine python3_default
19 Summary: Celery - Distributed Task Query
20 Name: python-%{module}
24 Group: Development/Languages/Python
25 Source0: http://pypi.python.org/packages/source/c/%{module}/%{module}-%{version}.tar.gz
26 # Source0-md5: fba8c4b269814dc6dbc36abb0e66c384
27 Source1: amqp-objects.inv
28 Source2: cyme-objects.inv
29 Source3: djcelery-objects.inv
30 Source4: kombu-objects.inv
31 Source5: python-objects.inv
32 Patch0: pytz_dependency.patch
33 Patch1: unittest2.patch
34 Patch2: intersphinx.patch
35 URL: http://celeryproject.org/
36 BuildRequires: rpm-pythonprov
37 BuildRequires: rpmbuild(macros) >= 1.710
38 BuildRequires: sed >= 4.0
40 BuildRequires: python-setuptools
42 BuildRequires: python-mock >= 1.0.1
43 BuildRequires: python-modules >= 1:2.7
44 BuildRequires: python-nose
47 BuildRequires: python-billiard
48 BuildRequires: python-django
49 BuildRequires: python-kombu
50 BuildRequires: python-pytz
51 BuildRequires: python-sphinxcontrib-issuetracker
52 BuildRequires: sphinx-pdg
56 BuildRequires: python3-setuptools
58 BuildRequires: python3-nose
61 Requires: python-billiard >= 3.3.0.21
62 Requires: python-kombu >= 3.0.29
65 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68 Celery is an asynchronous task queue/job queue based on distributed
69 message passing. It is focused on real-time operation, but supports
72 %package -n python3-%{module}
73 Summary: Celery - Distributed Task Query
74 Group: Development/Languages/Python
75 Requires: python3-billiard >= 3.3.0.21
76 Requires: python3-billiard < 3.4
77 Requires: python3-kombu >= 3.0.29
78 Requires: python3-kombu < 3.1
79 Requires: python3-pytz
81 %description -n python3-%{module}
82 Celery is an asynchronous task queue/job queue based on distributed
83 message passing. It is focused on real-time operation, but supports
87 Summary: Celery - Distributed Task Query
88 Group: Development/Languages/Python
89 %if %{with python3_default}
90 Requires: python3-%{module} = %{version}
92 Requires: python-%{module} = %{version}
95 %description -n celery
96 Celery is an asynchronous task queue/job queue based on distributed
97 message passing. It is focused on real-time operation, but supports
101 Summary: %{module} API documentation
102 Summary(pl.UTF-8): Dokumentacja API %{module}
106 API documentation for %{module}.
108 %description apidocs -l pl.UTF-8
109 Dokumentacja API %{module}.
112 %setup -q -n %{module}-%{version}
118 cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} docs
122 %py_build %{?with_tests:test}
126 PYTHONPATH=../build-2/lib %{__make} -j1 html
127 rm -rf .build/html/_sources
132 %py3_build %{?with_tests:test}
136 rm -rf $RPM_BUILD_ROOT
147 # install the right executables last
148 %if %{with python3} && %{without python3_default}
154 %if %{with python3} && %{with python3_default}
159 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
160 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
161 find $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -name '*.py' \
162 | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
165 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
166 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
167 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
168 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
172 rm -rf $RPM_BUILD_ROOT
175 %defattr(644,root,root,755)
176 %doc CONTRIBUTORS.txt Changelog LICENSE README.rst TODO extra
177 %{py_sitescriptdir}/%{module}
178 %{py_sitescriptdir}/celery-*.egg-info
179 %{_examplesdir}/%{name}-%{version}
181 %files -n python3-%{module}
182 %defattr(644,root,root,755)
183 %doc CONTRIBUTORS.txt Changelog LICENSE README.rst TODO extra
184 %{py3_sitescriptdir}/%{module}
185 %{py3_sitescriptdir}/celery-*.egg-info
186 %{_examplesdir}/python3-%{module}-%{version}
189 %attr(755,root,root) %{_bindir}/*
193 %defattr(644,root,root,755)
194 %doc docs/.build/html/*