python-sphinx-vl.spec 8.1 KB

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