source: projects/specs/trunk/p/python-sphinx/python-sphinx-vl.spec @ 11948

Revision 11948, 17.2 KB checked in by tomop, 5 years ago (diff)

python-sphinx-1.7.9-2

Line 
1%global upstream_name Sphinx
2
3%global py3_default 0
4
5Name:       python-sphinx
6Version:    1.7.9
7Release:    2%{?_dist_release}
8Summary:    Python documentation generator
9
10Group:      Development/Tools
11
12# Unless otherwise noted, the license for code is BSD
13# sphinx/util/stemmer.py Public Domain
14# sphinx/pycode/pgen2 Python
15# jquery (MIT or GPLv2)
16License: BSD and Public Domain and Python and (MIT or GPLv2)
17URL:        http://sphinx.pocoo.org/
18Vendor:     Project Vine
19Distribution: Vine Linux
20
21Source0:    http://pypi.python.org/packages/source/S/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
22Source1:    python2-sphinx
23Source2:    python3-sphinx
24Source3:    zz-modules-python-sphinx.sh
25Source4:    zz-modules-python-sphinx.csh
26Source5:    README.fedora
27# environment-modules file to select whether the py2 or py3 version of
28# python-sphinx execuitables is default
29Source6:    default-sphinx-command.in
30
31# Make the test_latex_remote_images an expected failure
32# since it requires an active internet connection
33# to fetch images, which is not possible in koji or mock.
34Patch0: xfail-test_latex_remote_images.patch
35
36# Allow extra themes to exist. We pull in python[23]-sphinx-theme-alabaster
37# which causes that test to fail.
38Patch1: sphinx-test_theming.diff
39
40BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root
41BuildArch:     noarch
42BuildRequires: python-rpm-macros
43BuildRequires: python-devel
44BuildRequires: python-setuptools
45
46BuildRequires: python-six
47BuildRequires: python-jinja2
48BuildRequires: python-pygments
49BuildRequires: python-docutils
50BuildRequires: python-snowballstemmer
51BuildRequires: python-babel
52BuildRequires: python-sphinx-theme-alabaster
53BuildRequires: python-imagesize
54BuildRequires: python-requests
55BuildRequires: python-packaging
56BuildRequires: python-typing
57BuildRequires: python-sphinxcontrib-websupport
58
59Requires:      python-sphinx-locale = %{version}-%{release}
60Requires:      python-six
61Requires:      python-jinja2
62Requires:      python-pygments
63Requires:      python-docutils
64Requires:      python-snowballstemmer
65Requires:      python-babel
66Requires:      python-sphinx-theme-alabaster
67Requires:      python-imagesize
68Requires:      python-requests
69Requires:      python-packaging
70Requires:      python-typing
71Requires:      python-sphinxcontrib-websupport
72
73%description
74Sphinx is a tool that makes it easy to create intelligent and
75beautiful documentation for Python projects (or other documents
76consisting of multiple reStructuredText sources), written by Georg
77Brandl. It was originally created to translate the new Python
78documentation, but has now been cleaned up in the hope that it will be
79useful to many other projects.
80
81Sphinx uses reStructuredText as its markup language, and many of its
82strengths come from the power and straightforwardness of
83reStructuredText and its parsing and translating suite, the Docutils.
84
85Although it is still under constant development, the following
86features are already present, work fine and can be seen "in action" in
87the Python docs:
88
89    * Output formats: HTML (including Windows HTML Help) and LaTeX,
90      for printable PDF versions
91    * Extensive cross-references: semantic markup and automatic links
92      for functions, classes, glossary terms and similar pieces of
93      information
94    * Hierarchical structure: easy definition of a document tree, with
95      automatic links to siblings, parents and children
96    * Automatic indices: general index as well as a module index
97    * Code handling: automatic highlighting using the Pygments highlighter
98    * Various extensions are available, e.g. for automatic testing of
99      snippets and inclusion of appropriately formatted docstrings.
100
101
102%package -n python3-sphinx
103Summary:       Python documentation generator
104Group:         Development/Tools
105
106BuildRequires: python3-rpm-macros
107BuildRequires: python3-devel
108BuildRequires: python3-setuptools
109
110BuildRequires: python3-six
111BuildRequires: python3-jinja2
112BuildRequires: python3-pygments
113BuildRequires: python3-docutils
114BuildRequires: python3-snowballstemmer
115BuildRequires: python3-babel
116BuildRequires: python3-sphinx-theme-alabaster
117BuildRequires: python3-imagesize
118BuildRequires: python3-requests
119BuildRequires: python3-packaging
120BuildRequires: python3-sphinxcontrib-websupport
121
122Requires:      python-sphinx-locale = %{version}-%{release}
123Requires:      python3-six
124Requires:      python3-jinja2
125Requires:      python3-pygments
126Requires:      python3-docutils
127Requires:      python3-snowballstemmer
128Requires:      python3-babel
129Requires:      python3-sphinx-theme-alabaster
130Requires:      python3-imagesize
131Requires:      python3-requests
132Requires:      python3-packaging
133Requires:      python3-sphinxcontrib-websupport
134
135%description -n python3-sphinx
136Sphinx is a tool that makes it easy to create intelligent and
137beautiful documentation for Python projects (or other documents
138consisting of multiple reStructuredText sources), written by Georg
139Brandl. It was originally created to translate the new Python
140documentation, but has now been cleaned up in the hope that it will be
141useful to many other projects.
142
143Sphinx uses reStructuredText as its markup language, and many of its
144strengths come from the power and straightforwardness of
145reStructuredText and its parsing and translating suite, the Docutils.
146
147Although it is still under constant development, the following
148features are already present, work fine and can be seen "in action" in
149the Python docs:
150
151    * Output formats: HTML (including Windows HTML Help) and LaTeX,
152      for printable PDF versions
153    * Extensive cross-references: semantic markup and automatic links
154      for functions, classes, glossary terms and similar pieces of
155      information
156    * Hierarchical structure: easy definition of a document tree, with
157      automatic links to siblings, parents and children
158    * Automatic indices: general index as well as a module index
159    * Code handling: automatic highlighting using the Pygments highlighter
160    * Various extensions are available, e.g. for automatic testing of
161      snippets and inclusion of appropriately formatted docstrings.
162
163%package locale
164Summary:       Locale files for %{name}
165Group:         Development/Tools
166License:       BSD
167
168%description locale
169Sphinx is a tool that makes it easy to create intelligent and
170beautiful documentation for Python projects (or other documents
171consisting of multiple reStructuredText sources), written by Georg
172Brandl. It was originally created to translate the new Python
173documentation, but has now been cleaned up in the hope that it will be
174useful to many other projects.
175
176This package contains locale files for Sphinx
177
178%package doc
179Summary:    Documentation for %{name}
180Group:      Documentation
181License:    BSD
182Requires:   %{name} = %{version}-%{release}
183
184
185%description doc
186Sphinx is a tool that makes it easy to create intelligent and
187beautiful documentation for Python projects (or other documents
188consisting of multiple reStructuredText sources), written by Georg
189Brandl. It was originally created to translate the new Python
190documentation, but has now been cleaned up in the hope that it will be
191useful to many other projects.
192
193This package contains documentation in reST and HTML formats.
194
195
196%prep
197%autosetup -n %{upstream_name}-%{version} -p1
198
199cp %{SOURCE5} .
200
201# fix line encoding of bundled jquery.js
202perl -pi -e 's/\r//' ./sphinx/themes/basic/static/jquery.js
203
204%if 0%{?with_python3}
205rm -rf %{py3dir}
206cp -a . %{py3dir}
207%endif # with_python3
208
209%build
210%{py_build}
211%{py3_build}
212
213export PYTHONPATH=$PWD
214pushd doc
215export SPHINXBUILD="%{__python3} ../sphinx/cmd/build.py"
216
217make html SPHINXBUILD="$SPHINXBUILD"
218make man SPHINXBUILD="$SPHINXBUILD"
219rm -rf _build/html/.buildinfo
220mv _build/html ..
221popd
222
223
224%install
225%__rm -rf %{buildroot}
226
227%{py3_install}
228install -d %{buildroot}%{_libexecdir}/python3-sphinx
229for i in sphinx-{apidoc,autogen,build,quickstart}; do
230    mv %{buildroot}%{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python3_version}
231    ln -s $i-%{python3_version} %{buildroot}%{_bindir}/$i-3
232    ln -s %{_bindir}/$i-3 %{buildroot}%{_libexecdir}/python3-sphinx/$i
233done
234
235%{py_install}
236install -d %{buildroot}%{_libexecdir}/python2-sphinx
237install -d %{buildroot}%{_libexecdir}/python2-sphinx
238for i in sphinx-{apidoc,autogen,build,quickstart}; do
239    mv %{buildroot}%{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python_version}
240    ln -s $i-%{python_version} %{buildroot}%{_bindir}/$i-2
241    ln -s %{_bindir}/$i-2 %{buildroot}%{_libexecdir}/python2-sphinx/$i
242done
243
244pushd doc
245# Deliver man pages
246install -d %{buildroot}%{_mandir}/man1
247for f in _build/man/sphinx-*.1;
248do
249    ### TODO: these are all the same.  Do we really need to ship them three
250    ### times or is it fine to just ship them as e.g. sphinx-build.1
251    cp -p $f %{buildroot}%{_mandir}/man1/$(basename $f)
252    cp -p $f %{buildroot}%{_mandir}/man1/$(basename $f | sed -e "s|.1$|-%{python_version}.1|")
253    cp -p $f %{buildroot}%{_mandir}/man1/$(basename $f | sed -e "s|.1$|-%{python3_version}.1|")
254done
255
256# Remove language files, they're identical to the ones from the
257# Python 2 build that will be moved to /usr/share below
258find %{buildroot}%{python3_sitelib}/sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -exec rm -rf '{}' \;
259popd
260
261# Clean up non-python files
262rm -f %{buildroot}%{python_sitelib}/sphinx/locale/.DS_Store
263rm -rf %{buildroot}%{python_sitelib}/sphinx/locale/.tx
264rm -f %{buildroot}%{python3_sitelib}/sphinx/locale/.DS_Store
265rm -rf %{buildroot}%{python3_sitelib}/sphinx/locale/.tx
266
267# Deliver rst files
268rm -rf doc/_build
269sed -i 's|python ../sphinx-build.py|/usr/bin/sphinx-build|' doc/Makefile
270mv doc reST
271
272# Move language files to /usr/share;
273# patch to support this incorporated in 0.6.6
274pushd %{buildroot}%{python_sitelib}
275
276for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`;
277do
278  install -d %{buildroot}%{_datadir}/sphinx/locale/$lang
279  install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
280  mv sphinx/locale/$lang/LC_MESSAGES/sphinx.js \
281     %{buildroot}%{_datadir}/sphinx/locale/$lang/
282  mv sphinx/locale/$lang/LC_MESSAGES/sphinx.mo \
283    %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/
284  rm -rf sphinx/locale/$lang
285done
286popd
287
288#install -d %{buildroot}%{_modulesdir}/python-sphinx
289#install -m 0644 %{SOURCE1} %{buildroot}%{_modulesdir}/python-sphinx/
290#sed -i 's|@python2_sphinx_dir@|%{_libexecdir}/python2-sphinx|' %{buildroot}%{_modulesdir}/python-sphinx/python2-sphinx
291#install -m 0644 %{SOURCE2} %{buildroot}%{_modulesdir}/python-sphinx/
292#sed -i 's|@python3_sphinx_dir@|%{_libexecdir}/python3-sphinx|' %{buildroot}%{_modulesdir}/python-sphinx/python3-sphinx
293
294install -d %{buildroot}%{_sysconfdir}/profile.d
295install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/profile.d/zz-modules-python-sphinx.sh
296install -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/profile.d/zz-modules-python-sphinx.csh
297
298%if %{py3_default}
299#sed 's/@PYTHONVER@/3/' < %{SOURCE6} > %{buildroot}%{_modulesdir}/python-sphinx/.version
300
301# These symlinks establish a default for when a package is first installed (and
302# therefore, environment modules is not loaded).  The user can immediately
303# switch them by using module swap python-sphinx/python2-sphinx
304for filename in sphinx-{build,apidoc,autogen,quickstart} ; do
305  ln -s %{_libexecdir}/python3-sphinx/$filename %{buildroot}%{_bindir}/$filename
306done
307
308%else
309#sed 's/@PYTHONVER@/2/' < %{SOURCE6} > %{buildroot}%{_modulesdir}/python-sphinx/.version
310
311# These symlinks establish a default for when a package is first installed (and
312# therefore, environment modules is not loaded).  The user can immediately
313# switch them by using module swap python-sphinx/python3-sphinx
314for filename in sphinx-{build,apidoc,autogen,quickstart} ; do
315  ln -s %{_libexecdir}/python2-sphinx/$filename %{buildroot}%{_bindir}/$filename
316done
317
318%endif
319
320%find_lang sphinx
321
322# Language files; Since these are javascript, it's not immediately obvious to
323# find_lang that they need to be marked with a language.
324(cd %{buildroot} && find . -name 'sphinx.js') | sed -e 's|^.||' | sed -e \
325  's:\(.*/locale/\)\([^/_]\+\)\(.*\.js$\):%lang(\2) \1\2\3:' \
326  >> sphinx.lang
327
328%clean
329%__rm -rf %{buildroot}
330
331
332%check
333#__make test
334
335
336%files
337%defattr(-,root,root,-)
338%license LICENSE
339%doc AUTHORS CHANGES EXAMPLES README.*
340%{_bindir}/sphinx-*-2*
341%{_bindir}/sphinx-build
342%{_bindir}/sphinx-apidoc
343%{_bindir}/sphinx-autogen
344%{_bindir}/sphinx-quickstart
345%{python_sitelib}/sphinx/
346%{python_sitelib}/Sphinx-%{version}-py%{python_version}.egg-info/
347%exclude %{_mandir}/man1/sphinx-*-%{python3_version}.1*
348%{_mandir}/man1/*
349%{_libexecdir}/python2-sphinx/
350#{_modulesdir}/python-sphinx/python2-sphinx
351%if !%{py3_default}
352#{_modulesdir}/python-sphinx/.version
353%endif
354%config(noreplace) %{_sysconfdir}/profile.d/zz-modules-python-sphinx.sh
355%config(noreplace) %{_sysconfdir}/profile.d/zz-modules-python-sphinx.csh
356
357%files -n python3-sphinx
358%license LICENSE
359%doc AUTHORS CHANGES EXAMPLES README.*
360%{_bindir}/sphinx-*-3*
361%{python3_sitelib}/sphinx/
362%{python3_sitelib}/Sphinx-%{version}-py%{python3_version}.egg-info/
363%{_mandir}/man1/sphinx-*-%{python3_version}.1*
364%{_libexecdir}/python3-sphinx/
365#{_modulesdir}/python-sphinx/python3-sphinx
366%if %{py3_default}
367#{_modulesdir}/python-sphinx/.version
368%endif
369%config(noreplace) %{_sysconfdir}/profile.d/zz-modules-python-sphinx.sh
370%config(noreplace) %{_sysconfdir}/profile.d/zz-modules-python-sphinx.csh
371
372%files locale -f sphinx.lang
373%license LICENSE
374%dir %{_datadir}/sphinx/
375%dir %{_datadir}/sphinx/locale
376%dir %{_datadir}/sphinx/locale/*
377
378%files doc
379%defattr(-,root,root,-)
380%doc html reST
381
382
383%changelog
384* Thu Nov 29 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.9-2
385- fixed R:.
386
387* Wed Nov 28 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.9-1
388- new upstream release.
389- dropped Patch2.
390- imported Patch0-1 from rawhide.
391- added python3 support.
392
393* Wed May 09 2018 Toshiaki Ara <ara_t@384.jp> 1.1.3-3
394- added patch2 from RedHat
395
396* Thu Jul  2 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.3-2
397- added patch0.
398
399* Sun Jun 30 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.1.3-1
400- new upstream release
401
402* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.7-2
403- rebuild with python-2.7.2
404
405* Thu May  5 2011 IWAI, Masaharu <iwai@alib.jp> 1.0.7-1
406- new upstream release
407- add BuildRequires: python-simplejson for Vine5
408- add Vendor and Distribution tags
409
410* Wed Dec 01 2010 Shu KONNO <owa@bg.wakwak.com> 1.0.5-1
411- update sphinx to 1.0.5
412
413* Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-1.b2
414- initial build based on Fedora development
415
416* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.0-0.1.b2.1
417- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
418
419* Mon May 31 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.0-0.2.b2
420- Update to 1.0 beta 2
421- Fixes problem building html documentation in non-English locales
422
423* Wed May 26 2010 Michel Salim <salimma@fedoraproject.org> - 1.0-0.1.b1
424- Update to 1.0 beta 1
425
426* Tue May 25 2010 Michel Salim <salimma@fedoraproject.org> - 0.6.6-1
427- Update to 0.6.6
428
429* Fri May 21 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.5-2
430- Few minor tweaks to Gareth's spec file update
431
432* Mon May 10 2010 Gareth Armstrong <gareth.armstrong@hp.com> - 0.6.5-1.hp
433- Update to 0.6.5
434- Initial import of python-sphinx from Fedora Rawhide for use in HP CMS
435- Enforce that Sphinx requires Python 2.4 or later via an explicit BR
436- Minor tweaks to spec file
437- Move language files to %%{_datadir}, idea borrowed from Debian's sphinx
438  package
439- Deliver man pages for sphinx-build & sphinx-quickstart
440- Deliver rst documentation files to reST directory in doc sub-package
441- Add %%check section for Python2 and add BR on python-nose
442
443* Wed Jan 13 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.4-1
444- Update to 0.6.4
445- Fixes a problem using autodoc with pylons projects.
446
447* Fri Sep  4 2009 Michel Salim <salimma@fedoraproject.org> - 0.6.3-1
448- Update to 0.6.3
449
450* Mon Aug 17 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.2-1
451- Update to 0.6.2 -- upstream bugfix requested inside bz#512438
452
453* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-3
454- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
455
456* Fri Jun 05 2009 Luke Macken <lmacken@redhat.com> - 0.6.1-2
457- Add a patch to use our own setuptools package
458
459* Fri Apr 17 2009 Michel Salim <salimma@fedoraproject.org> - 0.6.1-1
460- Update to 0.6.1
461
462* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2
463- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
464
465* Fri Jan  2 2009 Michel Salim <salimma@fedoraproject.org> - 0.5.1-1
466- Update to 0.5.1
467
468* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.5-2
469- Rebuild for Python 2.6
470
471* Mon Nov 24 2008 Michel Salim <salimma@fedoraproject.org> - 0.5-1
472- Update to 0.5
473
474* Fri Oct 10 2008 Michel Salim <salimma@fedoraproject.org> - 0.4.3-1
475- Update to 0.4.3
476
477* Wed Aug 27 2008 Toshio Kuratomi <toshio@fedoraproject.org> - 0.4.2-1.1
478- Fix for EL-5 build.
479
480* Mon Aug 25 2008 Michel Salim <salimma@fedoraproject.org> - 0.4.2-1
481- Update to 0.4.2
482
483* Mon May 26 2008 Michel Salim <salimma@fedoraproject.org> - 0.3-1
484- Update to 0.3
485
486* Fri May  2 2008 Michel Salim <salimma@fedoraproject.org> - 0.1.61950-3
487- Split documentation into subpackage
488- Exclude C files (not built by default anyway)
489
490* Wed Apr 16 2008 José Matos <jamatos@fc.up.pt> - 0.1.61950-2
491- Build html documentation, include it and include the rst
492  documentation.
493
494* Thu Mar 27 2008 Michel Salim <michel.sylvan@gmail.com> 0.1.61950-1
495- Initial package
Note: See TracBrowser for help on using the repository browser.