python-sphinx-vl.spec 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
  2. %global upstream_name Sphinx
  3. Name: python-sphinx
  4. Version: 1.0.5
  5. Release: 1%{?_dist_release}
  6. Summary: Python documentation generator
  7. Group: Development/Tools
  8. # Unless otherwise noted, the license for code is BSD
  9. # sphinx/util/stemmer.py Public Domain
  10. # sphinx/pycode/pgen2 Python
  11. # jquery (MIT or GPLv2)
  12. License: BSD and Public Domain and Python and (MIT or GPLv2)
  13. URL: http://sphinx.pocoo.org/
  14. Source0: http://pypi.python.org/packages/source/S/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
  15. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  16. BuildArch: noarch
  17. BuildRequires: python-devel >= 2.4
  18. BuildRequires: python-setuptools
  19. BuildRequires: python-docutils
  20. BuildRequires: python-jinja2
  21. BuildRequires: python-nose
  22. Requires: python-docutils
  23. Requires: python-jinja2
  24. Requires: python-pygments
  25. %description
  26. Sphinx is a tool that makes it easy to create intelligent and
  27. beautiful documentation for Python projects (or other documents
  28. consisting of multiple reStructuredText sources), written by Georg
  29. Brandl. It was originally created to translate the new Python
  30. documentation, but has now been cleaned up in the hope that it will be
  31. useful to many other projects.
  32. Sphinx uses reStructuredText as its markup language, and many of its
  33. strengths come from the power and straightforwardness of
  34. reStructuredText and its parsing and translating suite, the Docutils.
  35. Although it is still under constant development, the following
  36. features are already present, work fine and can be seen "in action" in
  37. the Python docs:
  38. * Output formats: HTML (including Windows HTML Help) and LaTeX,
  39. for printable PDF versions
  40. * Extensive cross-references: semantic markup and automatic links
  41. for functions, classes, glossary terms and similar pieces of
  42. information
  43. * Hierarchical structure: easy definition of a document tree, with
  44. automatic links to siblings, parents and children
  45. * Automatic indices: general index as well as a module index
  46. * Code handling: automatic highlighting using the Pygments highlighter
  47. * Various extensions are available, e.g. for automatic testing of
  48. snippets and inclusion of appropriately formatted docstrings.
  49. %package doc
  50. Summary: Documentation for %{name}
  51. Group: Documentation
  52. License: BSD
  53. Requires: %{name} = %{version}-%{release}
  54. %description doc
  55. Sphinx is a tool that makes it easy to create intelligent and
  56. beautiful documentation for Python projects (or other documents
  57. consisting of multiple reStructuredText sources), written by Georg
  58. Brandl. It was originally created to translate the new Python
  59. documentation, but has now been cleaned up in the hope that it will be
  60. useful to many other projects.
  61. This package contains documentation in reST and HTML formats.
  62. %prep
  63. %setup -q -n %{upstream_name}-%{version}
  64. %__sed '1d' -i sphinx/pycode/pgen2/token.py
  65. %build
  66. %{__python} setup.py build
  67. pushd doc
  68. %__make html
  69. %__rm -rf _build/html/.buildinfo
  70. %__mv _build/html ..
  71. %__rm -rf _*
  72. popd
  73. %install
  74. %__rm -rf %{buildroot}
  75. %{__python} setup.py install --skip-build --root %{buildroot}
  76. # Manpages not in beta release yet
  77. #pushd doc
  78. # Deliver man pages
  79. #install -d %{buildroot}%{_mandir}/man1
  80. #mv sphinx-*.1 %{buildroot}%{_mandir}/man1/
  81. #popd
  82. # Deliver rst files
  83. %__mv doc reST
  84. # Move language files to /usr/share in association with %patch1
  85. pushd %{buildroot}%{python_sitelib}
  86. for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -printf "%f "`;
  87. do
  88. install -d %{buildroot}%{_datadir}/sphinx/locale/$lang
  89. install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
  90. %__mv sphinx/locale/$lang/LC_MESSAGES/sphinx.js \
  91. %{buildroot}%{_datadir}/sphinx/locale/$lang/
  92. %__mv sphinx/locale/$lang/LC_MESSAGES/sphinx.mo \
  93. %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/
  94. %__rm -rf sphinx/locale/$lang
  95. done
  96. popd
  97. %find_lang sphinx
  98. # Language files; Since these are javascript, it's not immediately obvious to
  99. # find_lang that they need to be marked with a language.
  100. (cd %{buildroot} && find . -name 'sphinx.js') | %__sed -e 's|^.||' | %__sed -e \
  101. 's:\(.*/locale/\)\([^/_]\+\)\(.*\.js$\):%lang(\2) \1\2\3:' \
  102. >> sphinx.lang
  103. %clean
  104. %__rm -rf %{buildroot}
  105. %check
  106. %__make test
  107. %files -f sphinx.lang
  108. %defattr(-,root,root,-)
  109. %doc AUTHORS CHANGES EXAMPLES LICENSE README TODO
  110. %{_bindir}/sphinx-*
  111. %{python_sitelib}/*
  112. %{_datadir}/sphinx/
  113. %exclude %{_datadir}/sphinx/locale/*/sphinx.js
  114. #%{_mandir}/man1/*
  115. %files doc
  116. %defattr(-,root,root,-)
  117. %doc html reST
  118. %changelog
  119. * Wed Dec 01 2010 Shu KONNO <owa@bg.wakwak.com> 1.0.5-1
  120. - update sphinx to 1.0.5
  121. * Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-1.b2
  122. - initial build based on Fedora development
  123. * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.0-0.1.b2.1
  124. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  125. * Mon May 31 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.0-0.2.b2
  126. - Update to 1.0 beta 2
  127. - Fixes problem building html documentation in non-English locales
  128. * Wed May 26 2010 Michel Salim <salimma@fedoraproject.org> - 1.0-0.1.b1
  129. - Update to 1.0 beta 1
  130. * Tue May 25 2010 Michel Salim <salimma@fedoraproject.org> - 0.6.6-1
  131. - Update to 0.6.6
  132. * Fri May 21 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.5-2
  133. - Few minor tweaks to Gareth's spec file update
  134. * Mon May 10 2010 Gareth Armstrong <gareth.armstrong@hp.com> - 0.6.5-1.hp
  135. - Update to 0.6.5
  136. - Initial import of python-sphinx from Fedora Rawhide for use in HP CMS
  137. - Enforce that Sphinx requires Python 2.4 or later via an explicit BR
  138. - Minor tweaks to spec file
  139. - Move language files to %%{_datadir}, idea borrowed from Debian's sphinx
  140. package
  141. - Deliver man pages for sphinx-build & sphinx-quickstart
  142. - Deliver rst documentation files to reST directory in doc sub-package
  143. - Add %%check section for Python2 and add BR on python-nose
  144. * Wed Jan 13 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.4-1
  145. - Update to 0.6.4
  146. - Fixes a problem using autodoc with pylons projects.
  147. * Fri Sep 4 2009 Michel Salim <salimma@fedoraproject.org> - 0.6.3-1
  148. - Update to 0.6.3
  149. * Mon Aug 17 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.2-1
  150. - Update to 0.6.2 -- upstream bugfix requested inside bz#512438
  151. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-3
  152. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  153. * Fri Jun 05 2009 Luke Macken <lmacken@redhat.com> - 0.6.1-2
  154. - Add a patch to use our own setuptools package
  155. * Fri Apr 17 2009 Michel Salim <salimma@fedoraproject.org> - 0.6.1-1
  156. - Update to 0.6.1
  157. * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2
  158. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  159. * Fri Jan 2 2009 Michel Salim <salimma@fedoraproject.org> - 0.5.1-1
  160. - Update to 0.5.1
  161. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.5-2
  162. - Rebuild for Python 2.6
  163. * Mon Nov 24 2008 Michel Salim <salimma@fedoraproject.org> - 0.5-1
  164. - Update to 0.5
  165. * Fri Oct 10 2008 Michel Salim <salimma@fedoraproject.org> - 0.4.3-1
  166. - Update to 0.4.3
  167. * Wed Aug 27 2008 Toshio Kuratomi <toshio@fedoraproject.org> - 0.4.2-1.1
  168. - Fix for EL-5 build.
  169. * Mon Aug 25 2008 Michel Salim <salimma@fedoraproject.org> - 0.4.2-1
  170. - Update to 0.4.2
  171. * Mon May 26 2008 Michel Salim <salimma@fedoraproject.org> - 0.3-1
  172. - Update to 0.3
  173. * Fri May 2 2008 Michel Salim <salimma@fedoraproject.org> - 0.1.61950-3
  174. - Split documentation into subpackage
  175. - Exclude C files (not built by default anyway)
  176. * Wed Apr 16 2008 José Matos <jamatos@fc.up.pt> - 0.1.61950-2
  177. - Build html documentation, include it and include the rst
  178. documentation.
  179. * Thu Mar 27 2008 Michel Salim <michel.sylvan@gmail.com> 0.1.61950-1
  180. - Initial package