python-sphinx-vl.spec 13 KB

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