python-sphinx-vl.spec 8.4 KB

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