python-sphinx-vl.spec 8.9 KB

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