Lines 1-17
Link Here
|
|
|
1 |
%def_with doc |
2 |
|
1 |
%define oname sphinx |
3 |
%define oname sphinx |
2 |
%define sphinx_dir %python_sitelibdir_noarch/%oname |
4 |
%define sphinx_dir %python_sitelibdir_noarch/%oname |
3 |
%define sphinx3_dir %python3_sitelibdir_noarch/%oname |
5 |
%define sphinx3_dir %python3_sitelibdir_noarch/%oname |
4 |
|
6 |
|
5 |
Name: python-module-%oname |
7 |
Name: python-module-%oname |
6 |
Version: 1.6.5 |
8 |
Version: 1.6.5 |
7 |
Release: alt3 |
9 |
Release: alt4 |
8 |
Epoch: 1 |
10 |
Epoch: 1 |
9 |
|
11 |
|
10 |
Summary: Tool for producing documentation for Python projects |
12 |
Summary: Tool for producing documentation for Python projects |
11 |
License: BSD |
13 |
License: BSD |
12 |
Group: Development/Python |
14 |
Group: Development/Python |
|
|
15 |
|
13 |
Url: http://sphinx.pocoo.org/ |
16 |
Url: http://sphinx.pocoo.org/ |
14 |
# https://github.com/sphinx-doc/sphinx.git |
17 |
# https://github.com/sphinx-doc/sphinx.git |
|
|
18 |
|
19 |
Source0: %name-%version.tar |
20 |
Source1: conf.py.template |
21 |
Source2: macro |
22 |
Source3: macro3 |
23 |
Source4: refcounting.py |
24 |
Source5: sphinx-1.6.4-alt-disable-remote-tests.patch |
25 |
Patch0: sphinx-1.4b1-alt-avoid-download-objects.inv.patch |
26 |
|
15 |
BuildArch: noarch |
27 |
BuildArch: noarch |
16 |
|
28 |
|
17 |
%py_requires simplejson |
29 |
%py_requires simplejson |
Lines 24-47
BuildArch: noarch
Link Here
|
24 |
Provides: python-module-objects.inv |
36 |
Provides: python-module-objects.inv |
25 |
Obsoletes: python-module-objects.inv |
37 |
Obsoletes: python-module-objects.inv |
26 |
|
38 |
|
27 |
Source0: %name-%version.tar |
|
|
28 |
Source1: conf.py.template |
29 |
Source2: macro |
30 |
Source3: macro3 |
31 |
Source4: refcounting.py |
32 |
Source5: sphinx-1.6.4-alt-disable-remote-tests.patch |
33 |
Patch0: sphinx-1.4b1-alt-avoid-download-objects.inv.patch |
34 |
|
35 |
BuildRequires(pre): rpm-build-python |
39 |
BuildRequires(pre): rpm-build-python |
|
|
40 |
%if_with doc |
36 |
BuildRequires: python-sphinx-objects.inv |
41 |
BuildRequires: python-sphinx-objects.inv |
37 |
BuildRequires: python-module-docutils |
42 |
BuildRequires: python-module-docutils |
38 |
BuildRequires: python-module-html5lib |
43 |
BuildRequires: python-module-html5lib |
|
|
44 |
BuildRequires: python2.7(sphinxcontrib.websupport) |
45 |
BuildRequires: python2.7(sphinxcontrib) |
46 |
%endif |
39 |
BuildRequires: python-module-nose |
47 |
BuildRequires: python-module-nose |
40 |
BuildRequires: python-module-alabaster |
|
|
41 |
BuildRequires: python2.7(typing) |
48 |
BuildRequires: python2.7(typing) |
42 |
BuildRequires: python2.7(sphinxcontrib.websupport) |
|
|
43 |
BuildRequires: /usr/bin/convert |
49 |
BuildRequires: /usr/bin/convert |
44 |
BuildRequires: python2.7(sphinxcontrib) |
|
|
45 |
BuildRequires: %py_dependencies imagesize |
50 |
BuildRequires: %py_dependencies imagesize |
46 |
# For %%check: |
51 |
# For %%check: |
47 |
BuildRequires: %py_dependencies mock |
52 |
BuildRequires: %py_dependencies mock |
Lines 52-67
BuildRequires: python-module-Pygments >= 2.1.3
Link Here
|
52 |
BuildRequires: python-module-alabaster >= 0.7.6-alt2.git20150703 |
57 |
BuildRequires: python-module-alabaster >= 0.7.6-alt2.git20150703 |
53 |
|
58 |
|
54 |
BuildRequires(pre): rpm-build-python3 |
59 |
BuildRequires(pre): rpm-build-python3 |
|
|
60 |
%if_with doc |
61 |
BuildPreReq: python3(docutils) |
55 |
BuildPreReq: python3-module-html5lib |
62 |
BuildPreReq: python3-module-html5lib |
|
|
63 |
BuildPreReq: python3(sphinxcontrib.websupport) |
64 |
BuildPreReq: python3(requests.exceptions) |
65 |
%endif |
56 |
BuildPreReq: python3-module-nose |
66 |
BuildPreReq: python3-module-nose |
57 |
BuildPreReq: python3(typing) |
67 |
BuildPreReq: python3(typing) |
58 |
BuildPreReq: python3(sphinxcontrib.websupport) |
|
|
59 |
# For python3-2to3: |
68 |
# For python3-2to3: |
60 |
BuildPreReq: python3-tools |
69 |
BuildPreReq: python3-tools |
61 |
# For running the new sphinx itself (and generating the docs): |
70 |
# For running the new sphinx itself (and generating the docs): |
62 |
BuildPreReq: python3(imagesize) |
71 |
BuildPreReq: python3(imagesize) |
63 |
BuildPreReq: python3(mock) |
72 |
BuildPreReq: python3(mock) |
64 |
BuildPreReq: python3(docutils) |
|
|
65 |
BuildPreReq: python3(jinja2) |
73 |
BuildPreReq: python3(jinja2) |
66 |
BuildPreReq: python3(pygments) |
74 |
BuildPreReq: python3(pygments) |
67 |
BuildPreReq: python3-module-SQLAlchemy >= 1.0.8-alt2 |
75 |
BuildPreReq: python3-module-SQLAlchemy >= 1.0.8-alt2 |
Lines 150-156
This packages contains RPM macros for build with Sphinx.
Link Here
|
150 |
Summary: Development package for Sphinx |
158 |
Summary: Development package for Sphinx |
151 |
Group: Development/Python |
159 |
Group: Development/Python |
152 |
Requires: %name = %epoch:%version-%release |
160 |
Requires: %name = %epoch:%version-%release |
|
|
161 |
%if_with doc |
153 |
Requires: %name-pickles = %epoch:%version-%release |
162 |
Requires: %name-pickles = %epoch:%version-%release |
|
|
163 |
%endif |
154 |
Requires: rpm-macros-sphinx = %epoch:%version-%release |
164 |
Requires: rpm-macros-sphinx = %epoch:%version-%release |
155 |
|
165 |
|
156 |
%description devel |
166 |
%description devel |
Lines 223-229
This packages contains pickles for Sphinx.
Link Here
|
223 |
|
233 |
|
224 |
%prep |
234 |
%prep |
225 |
%setup |
235 |
%setup |
226 |
%patch0 -p1 |
236 |
%patch -p1 |
227 |
install -pm644 %_sourcedir/conf.py.template . |
237 |
install -pm644 %_sourcedir/conf.py.template . |
228 |
|
238 |
|
229 |
ln -s %_datadir/python-sphinx/objects.inv doc/ |
239 |
ln -s %_datadir/python-sphinx/objects.inv doc/ |
Lines 252-260
sed -i 's|%_bindir/env python|%_bindir/env python3|' \
Link Here
|
252 |
|
262 |
|
253 |
popd |
263 |
popd |
254 |
|
264 |
|
|
|
265 |
%if_with doc |
255 |
# docs |
266 |
# docs |
256 |
%make_build -C doc html |
267 |
%make_build -C doc html |
257 |
%make_build -C doc man |
268 |
%make_build -C doc man |
|
|
269 |
%endif |
258 |
|
270 |
|
259 |
%install |
271 |
%install |
260 |
pushd ../python3 |
272 |
pushd ../python3 |
Lines 296-301
ln -rs %buildroot%_datadir/python-sphinx/objects.inv \
Link Here
|
296 |
ln -frs %buildroot%_datadir/python-sphinx/objects.inv \ |
308 |
ln -frs %buildroot%_datadir/python-sphinx/objects.inv \ |
297 |
%buildroot%sphinx_dir/tests/ |
309 |
%buildroot%sphinx_dir/tests/ |
298 |
|
310 |
|
|
|
311 |
# macros |
312 |
install -d %buildroot%_rpmmacrosdir |
313 |
sed -e 's:@SPHINX_DIR@:%sphinx_dir:g' < macro > %buildroot%_rpmmacrosdir/sphinx |
314 |
sed -e 's:@SPHINX3_DIR@:%sphinx3_dir:g' < ../python3/macro3 > %buildroot%_rpmmacrosdir/sphinx3 |
315 |
|
316 |
%if_with doc |
299 |
# docs |
317 |
# docs |
300 |
install -d %buildroot%_docdir/%name |
318 |
install -d %buildroot%_docdir/%name |
301 |
install -d %buildroot%_man1dir |
319 |
install -d %buildroot%_man1dir |
Lines 303-313
cp -R doc/_build/html %buildroot%_docdir/%name/
Link Here
|
303 |
install -p -m644 AUTHORS CHANGES* EXAMPLES LICENSE README.rst \ |
321 |
install -p -m644 AUTHORS CHANGES* EXAMPLES LICENSE README.rst \ |
304 |
%buildroot%_docdir/%name |
322 |
%buildroot%_docdir/%name |
305 |
|
323 |
|
306 |
# macros |
|
|
307 |
install -d %buildroot%_rpmmacrosdir |
308 |
sed -e 's:@SPHINX_DIR@:%sphinx_dir:g' < macro > %buildroot%_rpmmacrosdir/sphinx |
309 |
sed -e 's:@SPHINX3_DIR@:%sphinx3_dir:g' < ../python3/macro3 > %buildroot%_rpmmacrosdir/sphinx3 |
310 |
|
311 |
# add pickle files |
324 |
# add pickle files |
312 |
%make_build -C doc pickle |
325 |
%make_build -C doc pickle |
313 |
|
326 |
|
Lines 320-325
install -p -m644 conf.py.template \
Link Here
|
320 |
|
333 |
|
321 |
install -p -m644 conf.py.template \ |
334 |
install -p -m644 conf.py.template \ |
322 |
%buildroot%sphinx3_dir/ |
335 |
%buildroot%sphinx3_dir/ |
|
|
336 |
%endif |
323 |
|
337 |
|
324 |
mkdir -p %buildroot%_rpmlibdir |
338 |
mkdir -p %buildroot%_rpmlibdir |
325 |
cat <<\EOF >%buildroot%_rpmlibdir/%name-files.req.list |
339 |
cat <<\EOF >%buildroot%_rpmlibdir/%name-files.req.list |
Lines 351-371
PYTHONPATH=$(pwd) %make_build test
Link Here
|
351 |
%exclude %_bindir/*-3* |
365 |
%exclude %_bindir/*-3* |
352 |
%sphinx_dir/ |
366 |
%sphinx_dir/ |
353 |
%exclude %sphinx_dir/tests |
367 |
%exclude %sphinx_dir/tests |
|
|
368 |
%if_with doc |
354 |
%exclude %sphinx_dir/pickle |
369 |
%exclude %sphinx_dir/pickle |
355 |
%exclude %sphinx_dir/doctrees |
370 |
%exclude %sphinx_dir/doctrees |
|
|
371 |
%endif |
356 |
%python_sitelibdir/*.egg-info |
372 |
%python_sitelibdir/*.egg-info |
357 |
|
373 |
|
358 |
%files devel |
374 |
%files devel |
359 |
|
375 |
|
|
|
376 |
%files tests |
377 |
%sphinx_dir/tests |
378 |
|
379 |
%if_with doc |
360 |
%files pickles |
380 |
%files pickles |
361 |
%sphinx_dir/pickle |
381 |
%sphinx_dir/pickle |
362 |
%sphinx_dir/doctrees |
382 |
%sphinx_dir/doctrees |
363 |
|
383 |
|
364 |
%files tests |
|
|
365 |
%sphinx_dir/tests |
366 |
|
367 |
%files doc |
384 |
%files doc |
368 |
%doc %_docdir/%name |
385 |
%doc %_docdir/%name |
|
|
386 |
%endif |
369 |
|
387 |
|
370 |
%files -n rpm-macros-sphinx |
388 |
%files -n rpm-macros-sphinx |
371 |
%_rpmmacrosdir/sphinx |
389 |
%_rpmmacrosdir/sphinx |
Lines 389-394
PYTHONPATH=$(pwd) %make_build test
Link Here
|
389 |
|
407 |
|
390 |
|
408 |
|
391 |
%changelog |
409 |
%changelog |
|
|
410 |
* Tue Apr 23 2019 Michael Shigorin <mike@altlinux.org> 1:1.6.5-alt4 |
411 |
- introduce doc knob (having a hairy package build its own |
412 |
documentation is a *very* bad thing during bootstrap |
413 |
and can hurt package version upgrades badly either) |
414 |
- added explicit BR: python3(requests.exceptions) |
415 |
|
392 |
* Tue Sep 18 2018 Igor Vlasenko <viy@altlinux.ru> 1:1.6.5-alt3 |
416 |
* Tue Sep 18 2018 Igor Vlasenko <viy@altlinux.ru> 1:1.6.5-alt3 |
393 |
- added sphinx-build-3 for compatibility with fedora |
417 |
- added sphinx-build-3 for compatibility with fedora |
394 |
|
418 |
|
395 |
- |
|
|