python-sphinx-vl.spec 13 KB

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