]> git.pld-linux.org Git - packages/python-celery.git/blame - python-celery.spec
fix apidocs build
[packages/python-celery.git] / python-celery.spec
CommitLineData
d9473a22
JK
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_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
13
14%if %{without python3}
15%undefine python3_default
16%endif
17
a9916a02 18%define module celery
d9473a22 19Summary: Celery - Distributed Task Query
a9916a02 20Name: python-%{module}
d9473a22 21Version: 3.1.19
f0ca0a00 22Release: 4
a9916a02 23License: BSD-like
24Group: Development/Languages/Python
25Source0: http://pypi.python.org/packages/source/c/%{module}/%{module}-%{version}.tar.gz
d9473a22
JK
26# Source0-md5: fba8c4b269814dc6dbc36abb0e66c384
27Source1: amqp-objects.inv
28Source2: cyme-objects.inv
29Source3: djcelery-objects.inv
30Source4: kombu-objects.inv
31Source5: python-objects.inv
32Patch0: pytz_dependency.patch
33Patch1: unittest2.patch
34Patch2: intersphinx.patch
2332a36a 35URL: http://celeryproject.org/
a9916a02 36BuildRequires: rpm-pythonprov
61ec3e45 37BuildRequires: rpmbuild(macros) >= 1.710
d9473a22
JK
38BuildRequires: sed >= 4.0
39%if %{with python2}
40BuildRequires: python-setuptools
41%if %{with tests}
42BuildRequires: python-mock >= 1.0.1
43BuildRequires: python-modules >= 1:2.7
44BuildRequires: python-nose
45%endif
28f8a25a
JK
46%if %{with doc}
47BuildRequires: python-billiard
48BuildRequires: python-django
49BuildRequires: python-kombu
50BuildRequires: python-pytz
51BuildRequires: python-sphinxcontrib-issuetracker
f0ca0a00 52BuildRequires: sphinx-pdg-2
28f8a25a 53%endif
d9473a22
JK
54%endif
55%if %{with python3}
56BuildRequires: python3-setuptools
57%if %{with tests}
58BuildRequires: python3-nose
59%endif
f0ca0a00
JK
60%if %{with doc}
61BuildRequires: python3-billiard
62BuildRequires: python3-django
63BuildRequires: python3-kombu
64BuildRequires: python3-pytz
65BuildRequires: python3-sphinxcontrib-issuetracker
66BuildRequires: sphinx-pdg-3
67%endif
d9473a22
JK
68%endif
69Requires: python-billiard >= 3.3.0.21
70Requires: python-kombu >= 3.0.29
71Requires: python-pytz
ef667580 72BuildArch: noarch
a9916a02 73BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74
75%description
2332a36a 76Celery is an asynchronous task queue/job queue based on distributed
77message passing. It is focused on real-time operation, but supports
78scheduling as well.
a9916a02 79
d9473a22
JK
80%package -n python3-%{module}
81Summary: Celery - Distributed Task Query
82Group: Development/Languages/Python
83Requires: python3-billiard >= 3.3.0.21
84Requires: python3-billiard < 3.4
85Requires: python3-kombu >= 3.0.29
86Requires: python3-kombu < 3.1
87Requires: python3-pytz
88
89%description -n python3-%{module}
90Celery is an asynchronous task queue/job queue based on distributed
91message passing. It is focused on real-time operation, but supports
92scheduling as well.
93
94%package -n celery
95Summary: Celery - Distributed Task Query
96Group: Development/Languages/Python
97%if %{with python3_default}
98Requires: python3-%{module} = %{version}
99%else
100Requires: python-%{module} = %{version}
101%endif
102
103%description -n celery
104Celery is an asynchronous task queue/job queue based on distributed
105message passing. It is focused on real-time operation, but supports
106scheduling as well.
107
108%package apidocs
109Summary: %{module} API documentation
110Summary(pl.UTF-8): Dokumentacja API %{module}
111Group: Documentation
112
113%description apidocs
114API documentation for %{module}.
115
116%description apidocs -l pl.UTF-8
117Dokumentacja API %{module}.
118
f0ca0a00
JK
119%package -n python3-%{module}-apidocs
120Summary: %{module} API documentation
121Summary(pl.UTF-8): Dokumentacja API %{module}
122Group: Documentation
123
124%description -n python3-%{module}-apidocs
125API documentation for %{module}.
126
127%description -n python3-%{module}-apidocs -l pl.UTF-8
128Dokumentacja API %{module}.
129
a9916a02 130%prep
131%setup -q -n %{module}-%{version}
132
d9473a22
JK
133%patch0 -p1
134%patch1 -p1
135%patch2 -p1
a9916a02 136
d9473a22 137cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} docs
a9916a02 138
d9473a22
JK
139%build
140%if %{with python2}
ac69e4fe 141%py_build %{?with_tests:test}
3ac9e124 142
d9473a22
JK
143%if %{with doc}
144cd docs
f0ca0a00 145PYTHONPATH=../build-2/lib %{__make} -j1 html SPHINXBUILD=sphinx-build-2
d9473a22 146rm -rf .build/html/_sources
f0ca0a00 147mv .build .build2
d9473a22
JK
148cd ..
149%endif
150%endif
151%if %{with python3}
ac69e4fe 152%py3_build %{?with_tests:test}
f0ca0a00
JK
153
154%if %{with doc} && 0
155cd docs
156PYTHONPATH=../build-3/lib %{__make} -j1 html SPHINXBUILD=sphinx-build-3
157rm -rf .build/html/_sources
158mv .build .build3
159cd ..
160%endif
d9473a22 161%endif
a9916a02 162
d9473a22 163%install
a9916a02 164rm -rf $RPM_BUILD_ROOT
165
d9473a22 166install_python2() {
ac69e4fe 167 %py_install
3ac9e124 168
d9473a22
JK
169 %py_postclean
170}
171install_python3() {
ac69e4fe 172 %py3_install
d9473a22 173}
2bb3228d 174
d9473a22
JK
175# install the right executables last
176%if %{with python3} && %{without python3_default}
177install_python3
178%endif
179%if %{with python2}
180install_python2
181%endif
182%if %{with python3} && %{with python3_default}
183install_python3
184%endif
3ac9e124 185
d9473a22
JK
186%if %{with python2}
187install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
188cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
189find $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -name '*.py' \
190 | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
191%endif
192%if %{with python3}
193install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
194cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
195find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
196 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
197%endif
198
199%clean
200rm -rf $RPM_BUILD_ROOT
3ac9e124 201
f0ca0a00 202%if %{with python2}
a9916a02 203%files
204%defattr(644,root,root,755)
d9473a22 205%doc CONTRIBUTORS.txt Changelog LICENSE README.rst TODO extra
ef667580 206%{py_sitescriptdir}/%{module}
ef667580 207%{py_sitescriptdir}/celery-*.egg-info
ef667580 208%{_examplesdir}/%{name}-%{version}
d9473a22 209
f0ca0a00
JK
210%if %{with doc}
211%files apidocs
212%defattr(644,root,root,755)
213%doc docs/.build2/html/*
214%endif
215%endif
216
217%if %{with python3}
d9473a22
JK
218%files -n python3-%{module}
219%defattr(644,root,root,755)
220%doc CONTRIBUTORS.txt Changelog LICENSE README.rst TODO extra
221%{py3_sitescriptdir}/%{module}
222%{py3_sitescriptdir}/celery-*.egg-info
223%{_examplesdir}/python3-%{module}-%{version}
224
f0ca0a00
JK
225%if %{with doc} && 0
226%files -n python3-%{module}-apidocs
d9473a22 227%defattr(644,root,root,755)
f0ca0a00 228%doc docs/.build3/html/*
d9473a22 229%endif
f0ca0a00
JK
230%endif
231
232%files -n celery
233%attr(755,root,root) %{_bindir}/*
This page took 0.257741 seconds and 4 git commands to generate.