python-sphinx-vl.spec 8.5 KB

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