python-sphinx-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. %bcond_with bootstrap
  2. %global upstream_name Sphinx
  3. %global py3_default 0
  4. Summary: Python documentation generator
  5. Name: python-sphinx
  6. Version: 3.2.1
  7. Release: 2%{?_dist_release}
  8. Group: publishing,programming
  9. Vendor: Project Vine
  10. Distribution: Vine Linux
  11. # Unless otherwise noted, the license for code is BSD
  12. # sphinx/util/stemmer.py Public Domain
  13. # sphinx/pycode/pgen2 Python
  14. # jquery (MIT or GPLv2)
  15. License: BSD and Public Domain and Python and (MIT or GPLv2)
  16. URL: http://sphinx.pocoo.org/
  17. Source0: https://pypi.python.org/packages/source/S/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
  18. # Allow extra themes to exist. We pull in python[23]-sphinx-theme-alabaster
  19. # which causes that test to fail.
  20. Patch1: sphinx-test_theming.diff
  21. BuildArch: noarch
  22. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  23. BuildRequires: python-rpm-macros
  24. %description
  25. Sphinx is a tool that makes it easy to create intelligent and
  26. beautiful documentation for Python projects (or other documents
  27. consisting of multiple reStructuredText sources), written by Georg
  28. Brandl. It was originally created to translate the new Python
  29. documentation, but has now been cleaned up in the hope that it will be
  30. useful to many other projects.
  31. Sphinx uses reStructuredText as its markup language, and many of its
  32. strengths come from the power and straightforwardness of
  33. reStructuredText and its parsing and translating suite, the Docutils.
  34. Although it is still under constant development, the following
  35. features are already present, work fine and can be seen "in action" in
  36. the Python docs:
  37. * Output formats: HTML (including Windows HTML Help) and LaTeX,
  38. for printable PDF versions
  39. * Extensive cross-references: semantic markup and automatic links
  40. for functions, classes, glossary terms and similar pieces of
  41. information
  42. * Hierarchical structure: easy definition of a document tree, with
  43. automatic links to siblings, parents and children
  44. * Automatic indices: general index as well as a module index
  45. * Code handling: automatic highlighting using the Pygments highlighter
  46. * Various extensions are available, e.g. for automatic testing of
  47. snippets and inclusion of appropriately formatted docstrings.
  48. %package -n python3-sphinx
  49. Summary: Python documentation generator
  50. Group: publishing,programming
  51. BuildRequires: python3-rpm-macros
  52. BuildRequires: python3-devel
  53. BuildRequires: python3-setuptools
  54. BuildRequires: python3-six
  55. BuildRequires: python3-jinja2
  56. BuildRequires: python3-docutils
  57. BuildRequires: python3-snowballstemmer
  58. BuildRequires: python3-babel
  59. BuildRequires: python3-sphinx-theme-alabaster
  60. BuildRequires: python3-imagesize
  61. BuildRequires: python3-requests
  62. BuildRequires: python3-packaging
  63. Requires: python3-setuptools
  64. Requires: python-sphinx-locale = %{version}-%{release}
  65. Requires: python3-six
  66. Requires: python3-jinja2
  67. Requires: python3-docutils
  68. Requires: python3-snowballstemmer
  69. Requires: python3-babel
  70. Requires: python3-sphinx-theme-alabaster
  71. Requires: python3-imagesize
  72. Requires: python3-requests
  73. Requires: python3-packaging
  74. %if !%{with bootstrap}
  75. BuildRequires: python3-pygments
  76. BuildRequires: python3-sphinxcontrib-websupport
  77. BuildRequires: python3-sphinxcontrib-serializinghtml
  78. BuildRequires: python3-sphinxcontrib-applehelp
  79. BuildRequires: python3-sphinxcontrib-devhelp
  80. BuildRequires: python3-sphinxcontrib-htmlhelp
  81. BuildRequires: python3-sphinxcontrib-qthelp
  82. BuildRequires: python3-sphinxcontrib-jsmath
  83. Requires: python3-pygments
  84. Requires: python3-sphinxcontrib-websupport
  85. Requires: python3-sphinxcontrib-serializinghtml
  86. Requires: python3-sphinxcontrib-applehelp
  87. Requires: python3-sphinxcontrib-devhelp
  88. Requires: python3-sphinxcontrib-htmlhelp
  89. Requires: python3-sphinxcontrib-qthelp
  90. Requires: python3-sphinxcontrib-jsmath
  91. %endif
  92. %description -n python3-sphinx
  93. Sphinx is a tool that makes it easy to create intelligent and
  94. beautiful documentation for Python projects (or other documents
  95. consisting of multiple reStructuredText sources), written by Georg
  96. Brandl. It was originally created to translate the new Python
  97. documentation, but has now been cleaned up in the hope that it will be
  98. useful to many other projects.
  99. Sphinx uses reStructuredText as its markup language, and many of its
  100. strengths come from the power and straightforwardness of
  101. reStructuredText and its parsing and translating suite, the Docutils.
  102. Although it is still under constant development, the following
  103. features are already present, work fine and can be seen "in action" in
  104. the Python docs:
  105. * Output formats: HTML (including Windows HTML Help) and LaTeX,
  106. for printable PDF versions
  107. * Extensive cross-references: semantic markup and automatic links
  108. for functions, classes, glossary terms and similar pieces of
  109. information
  110. * Hierarchical structure: easy definition of a document tree, with
  111. automatic links to siblings, parents and children
  112. * Automatic indices: general index as well as a module index
  113. * Code handling: automatic highlighting using the Pygments highlighter
  114. * Various extensions are available, e.g. for automatic testing of
  115. snippets and inclusion of appropriately formatted docstrings.
  116. %package locale
  117. Summary: Locale files for %{name}
  118. Group: publishing
  119. License: BSD
  120. %description locale
  121. Sphinx is a tool that makes it easy to create intelligent and
  122. beautiful documentation for Python projects (or other documents
  123. consisting of multiple reStructuredText sources), written by Georg
  124. Brandl. It was originally created to translate the new Python
  125. documentation, but has now been cleaned up in the hope that it will be
  126. useful to many other projects.
  127. This package contains locale files for Sphinx
  128. %package doc
  129. Summary: Documentation for %{name}
  130. Group: documentation
  131. License: BSD
  132. %description doc
  133. Sphinx is a tool that makes it easy to create intelligent and
  134. beautiful documentation for Python projects (or other documents
  135. consisting of multiple reStructuredText sources), written by Georg
  136. Brandl. It was originally created to translate the new Python
  137. documentation, but has now been cleaned up in the hope that it will be
  138. useful to many other projects.
  139. This package contains documentation in reST and HTML formats.
  140. %prep
  141. %autosetup -n %{upstream_name}-%{version} -p1
  142. # fix line encoding of bundled jquery.js
  143. perl -pi -e 's/\r//' ./sphinx/themes/basic/static/jquery.js
  144. %build
  145. %py3_build
  146. %if !%{with bootstrap}
  147. export PYTHONPATH=$PWD
  148. pushd doc
  149. export SPHINXBUILD="%{__python3} ../sphinx/cmd/build.py"
  150. make html SPHINXBUILD="$SPHINXBUILD"
  151. make man SPHINXBUILD="$SPHINXBUILD"
  152. rm -rf _build/html/.buildinfo
  153. mv _build/html ..
  154. popd
  155. %endif
  156. %install
  157. %__rm -rf %{buildroot}
  158. %py3_install
  159. # Clean up non-python files
  160. rm -f %{buildroot}%{python3_sitelib}/sphinx/locale/.DS_Store
  161. rm -rf %{buildroot}%{python3_sitelib}/sphinx/locale/.tx
  162. %if !%{with bootstrap}
  163. pushd doc
  164. # Deliver man pages
  165. install -d %{buildroot}%{_mandir}/man1
  166. for f in _build/man/sphinx-*.1;
  167. do
  168. cp -p $f %{buildroot}%{_mandir}/man1/$(basename $f)
  169. done
  170. popd
  171. %endif
  172. # Deliver rst files
  173. rm -rf doc/_build
  174. sed -i 's|python ../sphinx-build.py|/usr/bin/sphinx-build|' doc/Makefile
  175. mv doc reST
  176. rm reST/make.bat
  177. # Move language files to /usr/share;
  178. # patch to support this incorporated in 0.6.6
  179. pushd %{buildroot}%{python3_sitelib}
  180. for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\.
  181. *' -printf "%f "`;
  182. do
  183. test $lang == __pycache__ && continue
  184. install -d %{buildroot}%{_datadir}/sphinx/locale/$lang
  185. install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
  186. mv sphinx/locale/$lang/LC_MESSAGES/sphinx.js \
  187. %{buildroot}%{_datadir}/sphinx/locale/$lang/
  188. mv sphinx/locale/$lang/LC_MESSAGES/sphinx.mo \
  189. %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/
  190. rm -rf sphinx/locale/$lang
  191. done
  192. popd
  193. # Create the sphinxcontrib directory, so we can own it
  194. # See https://bugzilla.redhat.com/show_bug.cgi?id=1669790 for rationale
  195. mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib
  196. %find_lang sphinx
  197. # Language files; Since these are javascript, it's not immediately obvious to
  198. # find_lang that they need to be marked with a language.
  199. (cd %{buildroot} && find . -name 'sphinx.js') | sed -e 's|^.||' | sed -e \
  200. 's:\(.*/locale/\)\([^/_]\+\)\(.*\.js$\):%lang(\2) \1\2\3:' \
  201. >> sphinx.lang
  202. %clean
  203. %__rm -rf %{buildroot}
  204. %check
  205. #__make test
  206. %files -n python3-sphinx
  207. %license LICENSE
  208. %doc AUTHORS CHANGES EXAMPLES README.*
  209. %{_bindir}/sphinx-*
  210. %{python3_sitelib}/sphinx/
  211. %{python3_sitelib}/Sphinx-%{version}-py%{python3_version}.egg-info/
  212. %dir %{python3_sitelib}/sphinxcontrib/
  213. %dir %{_datadir}/sphinx/
  214. %if !%{with bootstrap}
  215. %{_mandir}/man1/sphinx-*
  216. %endif
  217. %files locale -f sphinx.lang
  218. %license LICENSE
  219. %dir %{_datadir}/sphinx/
  220. %dir %{_datadir}/sphinx/locale
  221. %dir %{_datadir}/sphinx/locale/*
  222. %files doc
  223. %defattr(-,root,root,-)
  224. %license LICENSE
  225. %if !%{with bootstrap}
  226. %doc html reST
  227. %endif
  228. %changelog
  229. * Tue Aug 18 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.2.1-2
  230. - added R:python3-sphinxcontrib-jsmath.
  231. * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.2.1-1
  232. - new upstream release.
  233. - built with python3 only.
  234. * Thu Nov 29 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.9-2
  235. - fixed R:.
  236. * Wed Nov 28 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.9-1
  237. - new upstream release.
  238. - dropped Patch2.
  239. - imported Patch0-1 from rawhide.
  240. - added python3 support.
  241. * Wed May 09 2018 Toshiaki Ara <ara_t@384.jp> 1.1.3-3
  242. - added patch2 from RedHat
  243. * Thu Jul 2 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.3-2
  244. - added patch0.
  245. * Sun Jun 30 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.1.3-1
  246. - new upstream release
  247. * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.7-2
  248. - rebuild with python-2.7.2
  249. * Thu May 5 2011 IWAI, Masaharu <iwai@alib.jp> 1.0.7-1
  250. - new upstream release
  251. - add BuildRequires: python-simplejson for Vine5
  252. - add Vendor and Distribution tags
  253. * Wed Dec 01 2010 Shu KONNO <owa@bg.wakwak.com> 1.0.5-1
  254. - update sphinx to 1.0.5
  255. * Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-1.b2
  256. - initial build based on Fedora development
  257. * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.0-0.1.b2.1
  258. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  259. * Mon May 31 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.0-0.2.b2
  260. - Update to 1.0 beta 2
  261. - Fixes problem building html documentation in non-English locales
  262. * Wed May 26 2010 Michel Salim <salimma@fedoraproject.org> - 1.0-0.1.b1
  263. - Update to 1.0 beta 1
  264. * Tue May 25 2010 Michel Salim <salimma@fedoraproject.org> - 0.6.6-1
  265. - Update to 0.6.6
  266. * Fri May 21 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.5-2
  267. - Few minor tweaks to Gareth's spec file update
  268. * Mon May 10 2010 Gareth Armstrong <gareth.armstrong@hp.com> - 0.6.5-1.hp
  269. - Update to 0.6.5
  270. - Initial import of python-sphinx from Fedora Rawhide for use in HP CMS
  271. - Enforce that Sphinx requires Python 2.4 or later via an explicit BR
  272. - Minor tweaks to spec file
  273. - Move language files to %%{_datadir}, idea borrowed from Debian's sphinx
  274. package
  275. - Deliver man pages for sphinx-build & sphinx-quickstart
  276. - Deliver rst documentation files to reST directory in doc sub-package
  277. - Add %%check section for Python2 and add BR on python-nose
  278. * Wed Jan 13 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.4-1
  279. - Update to 0.6.4
  280. - Fixes a problem using autodoc with pylons projects.
  281. * Fri Sep 4 2009 Michel Salim <salimma@fedoraproject.org> - 0.6.3-1
  282. - Update to 0.6.3
  283. * Mon Aug 17 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.2-1
  284. - Update to 0.6.2 -- upstream bugfix requested inside bz#512438
  285. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-3
  286. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  287. * Fri Jun 05 2009 Luke Macken <lmacken@redhat.com> - 0.6.1-2
  288. - Add a patch to use our own setuptools package
  289. * Fri Apr 17 2009 Michel Salim <salimma@fedoraproject.org> - 0.6.1-1
  290. - Update to 0.6.1
  291. * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2
  292. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  293. * Fri Jan 2 2009 Michel Salim <salimma@fedoraproject.org> - 0.5.1-1
  294. - Update to 0.5.1
  295. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.5-2
  296. - Rebuild for Python 2.6
  297. * Mon Nov 24 2008 Michel Salim <salimma@fedoraproject.org> - 0.5-1
  298. - Update to 0.5
  299. * Fri Oct 10 2008 Michel Salim <salimma@fedoraproject.org> - 0.4.3-1
  300. - Update to 0.4.3
  301. * Wed Aug 27 2008 Toshio Kuratomi <toshio@fedoraproject.org> - 0.4.2-1.1
  302. - Fix for EL-5 build.
  303. * Mon Aug 25 2008 Michel Salim <salimma@fedoraproject.org> - 0.4.2-1
  304. - Update to 0.4.2
  305. * Mon May 26 2008 Michel Salim <salimma@fedoraproject.org> - 0.3-1
  306. - Update to 0.3
  307. * Fri May 2 2008 Michel Salim <salimma@fedoraproject.org> - 0.1.61950-3
  308. - Split documentation into subpackage
  309. - Exclude C files (not built by default anyway)
  310. * Wed Apr 16 2008 José Matos <jamatos@fc.up.pt> - 0.1.61950-2
  311. - Build html documentation, include it and include the rst
  312. documentation.
  313. * Thu Mar 27 2008 Michel Salim <michel.sylvan@gmail.com> 0.1.61950-1
  314. - Initial package