]> git.pld-linux.org Git - packages/python-celery.git/blob - python-celery.spec
- updated to 4.4.7 (last version for python 2.7)
[packages/python-celery.git] / python-celery.spec
1
2 # TODO:
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.
6
7 # Conditional build:
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
13
14 %if %{without python3}
15 %undefine       python3_default
16 %endif
17
18 %define         module  celery
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
23 Version:        4.4.7
24 Release:        1
25 License:        BSD-like
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/
32 %if %{with python2}
33 BuildRequires:  python-modules >= 1:2.7
34 BuildRequires:  python-setuptools
35 %if %{with tests}
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
49 %endif
50 %endif
51 %if %{with python3}
52 BuildRequires:  python3-modules >= 1:3.5
53 BuildRequires:  python3-setuptools
54 %if %{with tests}
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
70 %endif
71 %endif
72 BuildRequires:  rpm-pythonprov
73 BuildRequires:  rpmbuild(macros) >= 1.714
74 BuildRequires:  sed >= 4.0
75 %if %{with doc}
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
85 %endif
86 BuildArch:      noarch
87 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
88
89 %description
90 Celery is an asynchronous task queue/job queue based on distributed
91 message passing. It is focused on real-time operation, but supports
92 scheduling as well.
93
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.
98
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
103
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
107 scheduling as well.
108
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.
113
114 %package -n celery
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}
120 %else
121 Requires:       python-%{module} = %{version}
122 %endif
123
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
127 scheduling as well.
128
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.
133
134 %package apidocs
135 Summary:        API documentation for Celery
136 Summary(pl.UTF-8):      Dokumentacja API Celery
137 Group:          Documentation
138 Obsoletes:      python3-celery-apidocs < 4.4.7
139
140 %description apidocs
141 API documentation for Celery.
142
143 %description apidocs -l pl.UTF-8
144 Dokumentacja API Celery.
145
146 %prep
147 %setup -q -n %{module}-%{version}
148 %patch0 -p1
149
150 %build
151 %if %{with python2}
152 %py_build
153
154 %if %{with tests}
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+
159 %endif
160 %endif
161
162 %if %{with python3}
163 %py3_build
164
165 %if %{with tests}
166 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
167 PYTEST_PLUGINS=case.pytest \
168 %{__python3} -m pytest t/unit
169 %endif
170 %endif
171
172 %if %{with doc}
173 %{__make} -C docs html \
174         SPHINXBUILD=sphinx-build-3
175 %endif
176
177 %install
178 rm -rf $RPM_BUILD_ROOT
179
180 %if %{with python2}
181 %py_install
182
183 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{celery,celery-2}
184
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}|'
189
190 %py_postclean
191 %endif
192
193 %if %{with python3}
194 %py3_install
195
196 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{celery,celery-3}
197
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}|'
202
203 %if %{with python3_default}
204 ln -sf celery-3 $RPM_BUILD_ROOT%{_bindir}/celery
205 %endif
206 %endif
207
208 %if %{without python3_default}
209 ln -sf celery-2 $RPM_BUILD_ROOT%{_bindir}/celery
210 %endif
211
212 %clean
213 rm -rf $RPM_BUILD_ROOT
214
215 %if %{with python2}
216 %files
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}
223 %endif
224
225 %if %{with python3}
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}
233 %endif
234
235 %if %{with doc}
236 %files apidocs
237 %defattr(644,root,root,755)
238 %doc docs/.build2/html/*
239 %endif
240
241 %files -n celery
242 %defattr(644,root,root,755)
243 %attr(755,root,root) %{_bindir}/celery
This page took 0.841072 seconds and 3 git commands to generate.