|
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 223-229
This packages contains pickles for Sphinx.
Link Here
|
| 223 |
|
231 |
|
| 224 |
%prep |
232 |
%prep |
| 225 |
%setup |
233 |
%setup |
| 226 |
%patch0 -p1 |
234 |
%patch -p1 |
| 227 |
install -pm644 %_sourcedir/conf.py.template . |
235 |
install -pm644 %_sourcedir/conf.py.template . |
| 228 |
|
236 |
|
| 229 |
ln -s %_datadir/python-sphinx/objects.inv doc/ |
237 |
ln -s %_datadir/python-sphinx/objects.inv doc/ |
|
Lines 252-260
sed -i 's|%_bindir/env python|%_bindir/env python3|' \
Link Here
|
| 252 |
|
260 |
|
| 253 |
popd |
261 |
popd |
| 254 |
|
262 |
|
|
|
263 |
%if_with doc |
| 255 |
# docs |
264 |
# docs |
| 256 |
%make_build -C doc html |
265 |
%make_build -C doc html |
| 257 |
%make_build -C doc man |
266 |
%make_build -C doc man |
|
|
267 |
%endif |
| 258 |
|
268 |
|
| 259 |
%install |
269 |
%install |
| 260 |
pushd ../python3 |
270 |
pushd ../python3 |
|
Lines 296-301
ln -rs %buildroot%_datadir/python-sphinx/objects.inv \
Link Here
|
| 296 |
ln -frs %buildroot%_datadir/python-sphinx/objects.inv \ |
306 |
ln -frs %buildroot%_datadir/python-sphinx/objects.inv \ |
| 297 |
%buildroot%sphinx_dir/tests/ |
307 |
%buildroot%sphinx_dir/tests/ |
| 298 |
|
308 |
|
|
|
309 |
# macros |
| 310 |
install -d %buildroot%_rpmmacrosdir |
| 311 |
sed -e 's:@SPHINX_DIR@:%sphinx_dir:g' < macro > %buildroot%_rpmmacrosdir/sphinx |
| 312 |
sed -e 's:@SPHINX3_DIR@:%sphinx3_dir:g' < ../python3/macro3 > %buildroot%_rpmmacrosdir/sphinx3 |
| 313 |
|
| 314 |
%if_with doc |
| 299 |
# docs |
315 |
# docs |
| 300 |
install -d %buildroot%_docdir/%name |
316 |
install -d %buildroot%_docdir/%name |
| 301 |
install -d %buildroot%_man1dir |
317 |
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 \ |
319 |
install -p -m644 AUTHORS CHANGES* EXAMPLES LICENSE README.rst \ |
| 304 |
%buildroot%_docdir/%name |
320 |
%buildroot%_docdir/%name |
| 305 |
|
321 |
|
| 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 |
322 |
# add pickle files |
| 312 |
%make_build -C doc pickle |
323 |
%make_build -C doc pickle |
| 313 |
|
324 |
|
|
Lines 320-325
install -p -m644 conf.py.template \
Link Here
|
| 320 |
|
331 |
|
| 321 |
install -p -m644 conf.py.template \ |
332 |
install -p -m644 conf.py.template \ |
| 322 |
%buildroot%sphinx3_dir/ |
333 |
%buildroot%sphinx3_dir/ |
|
|
334 |
%endif |
| 323 |
|
335 |
|
| 324 |
mkdir -p %buildroot%_rpmlibdir |
336 |
mkdir -p %buildroot%_rpmlibdir |
| 325 |
cat <<\EOF >%buildroot%_rpmlibdir/%name-files.req.list |
337 |
cat <<\EOF >%buildroot%_rpmlibdir/%name-files.req.list |
|
Lines 351-371
PYTHONPATH=$(pwd) %make_build test
Link Here
|
| 351 |
%exclude %_bindir/*-3* |
363 |
%exclude %_bindir/*-3* |
| 352 |
%sphinx_dir/ |
364 |
%sphinx_dir/ |
| 353 |
%exclude %sphinx_dir/tests |
365 |
%exclude %sphinx_dir/tests |
|
|
366 |
%if_with doc |
| 354 |
%exclude %sphinx_dir/pickle |
367 |
%exclude %sphinx_dir/pickle |
| 355 |
%exclude %sphinx_dir/doctrees |
368 |
%exclude %sphinx_dir/doctrees |
|
|
369 |
%endif |
| 356 |
%python_sitelibdir/*.egg-info |
370 |
%python_sitelibdir/*.egg-info |
| 357 |
|
371 |
|
| 358 |
%files devel |
372 |
%files devel |
| 359 |
|
373 |
|
|
|
374 |
%files tests |
| 375 |
%sphinx_dir/tests |
| 376 |
|
| 377 |
%if_with doc |
| 360 |
%files pickles |
378 |
%files pickles |
| 361 |
%sphinx_dir/pickle |
379 |
%sphinx_dir/pickle |
| 362 |
%sphinx_dir/doctrees |
380 |
%sphinx_dir/doctrees |
| 363 |
|
381 |
|
| 364 |
%files tests |
|
|
| 365 |
%sphinx_dir/tests |
| 366 |
|
| 367 |
%files doc |
382 |
%files doc |
| 368 |
%doc %_docdir/%name |
383 |
%doc %_docdir/%name |
|
|
384 |
%endif |
| 369 |
|
385 |
|
| 370 |
%files -n rpm-macros-sphinx |
386 |
%files -n rpm-macros-sphinx |
| 371 |
%_rpmmacrosdir/sphinx |
387 |
%_rpmmacrosdir/sphinx |
|
Lines 389-394
PYTHONPATH=$(pwd) %make_build test
Link Here
|
| 389 |
|
405 |
|
| 390 |
|
406 |
|
| 391 |
%changelog |
407 |
%changelog |
|
|
408 |
* Tue Apr 23 2019 Michael Shigorin <mike@altlinux.org> 1:1.6.5-alt4 |
| 409 |
- introduce doc knob (having a hairy package build its own |
| 410 |
documentation is a *very* bad thing during bootstrap |
| 411 |
and can hurt package version upgrades badly either) |
| 412 |
- added explicit BR: python3(requests.exceptions) |
| 413 |
|
| 392 |
* Tue Sep 18 2018 Igor Vlasenko <viy@altlinux.ru> 1:1.6.5-alt3 |
414 |
* Tue Sep 18 2018 Igor Vlasenko <viy@altlinux.ru> 1:1.6.5-alt3 |
| 393 |
- added sphinx-build-3 for compatibility with fedora |
415 |
- added sphinx-build-3 for compatibility with fedora |
| 394 |
|
416 |
|
| 395 |
- |
|
|