sphinx.scm 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014 David Thompson <davet@gnu.org>
  3. ;;; Copyright © 2015, 2017, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
  4. ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
  5. ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
  6. ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
  7. ;;; Copyright © 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
  8. ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
  9. ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
  10. ;;; Copyright © 2017 Christine Lemmer-Webber <cwebber@dustycloud.org>
  11. ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
  12. ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
  13. ;;; Copyright © 2019, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
  14. ;;; Copyright © 2019 Alexandros Theodotou <alex@zrythm.org>
  15. ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
  16. ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
  17. ;;; Copyright © 2021 Eric Bavier <bavier@posteo.net>
  18. ;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
  19. ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
  20. ;;;
  21. ;;; This file is part of GNU Guix.
  22. ;;;
  23. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  24. ;;; under the terms of the GNU General Public License as published by
  25. ;;; the Free Software Foundation; either version 3 of the License, or (at
  26. ;;; your option) any later version.
  27. ;;;
  28. ;;; GNU Guix is distributed in the hope that it will be useful, but
  29. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  30. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  31. ;;; GNU General Public License for more details.
  32. ;;;
  33. ;;; You should have received a copy of the GNU General Public License
  34. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  35. (define-module (gnu packages sphinx)
  36. #:use-module (guix packages)
  37. #:use-module (guix download)
  38. #:use-module (guix git-download)
  39. #:use-module (guix utils)
  40. #:use-module (guix build-system python)
  41. #:use-module ((guix licenses) #:prefix license:)
  42. #:use-module (gnu packages)
  43. #:use-module (gnu packages check)
  44. #:use-module (gnu packages graphviz)
  45. #:use-module (gnu packages image)
  46. #:use-module (gnu packages imagemagick)
  47. #:use-module (gnu packages python-build)
  48. #:use-module (gnu packages python-crypto)
  49. #:use-module (gnu packages python-web)
  50. #:use-module (gnu packages python-xyz)
  51. #:use-module (gnu packages time)
  52. #:use-module (gnu packages python-science)
  53. #:use-module (gnu packages graph))
  54. (define-public python-sphinx
  55. (package
  56. (name "python-sphinx")
  57. (version "4.0.3")
  58. (source
  59. (origin
  60. (method url-fetch)
  61. (uri (pypi-uri "Sphinx" version))
  62. (sha256
  63. (base32
  64. "1f7vnk3g135b2zs9yq3kgrczxa91mhrlfw8243dpxsq8lbk5gwyz"))))
  65. (build-system python-build-system)
  66. (arguments
  67. `(#:phases
  68. (modify-phases %standard-phases
  69. (replace 'check
  70. (lambda _
  71. ;; Requires Internet access.
  72. (delete-file "tests/test_build_linkcheck.py")
  73. (substitute* "tests/test_build_latex.py"
  74. (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
  75. "@pytest.mark.skip()"))
  76. (invoke "make" "test"))))))
  77. (propagated-inputs
  78. `(("python-babel" ,python-babel)
  79. ("python-docutils" ,python-docutils)
  80. ("python-jinja2" ,python-jinja2)
  81. ("python-imagesize" ,python-imagesize)
  82. ("python-packaging" ,python-packaging)
  83. ("python-pygments" ,python-pygments)
  84. ("python-requests" ,python-requests)
  85. ("python-snowballstemmer" ,python-snowballstemmer)
  86. ("python-sphinx-alabaster-theme"
  87. ,python-sphinx-alabaster-theme)
  88. ("python-sphinxcontrib-applehelp" ,python-sphinxcontrib-applehelp)
  89. ("python-sphinxcontrib-devhelp" ,python-sphinxcontrib-devhelp)
  90. ("python-sphinxcontrib-htmlhelp" ,python-sphinxcontrib-htmlhelp)
  91. ("python-sphinxcontrib-jsmath" ,python-sphinxcontrib-jsmath)
  92. ("python-sphinxcontrib-qthelp" ,python-sphinxcontrib-qthelp)
  93. ("python-sphinxcontrib-serializinghtml"
  94. ,python-sphinxcontrib-serializinghtml)))
  95. (native-inputs
  96. `(("graphviz" ,graphviz)
  97. ("imagemagick" ,imagemagick) ;for "convert"
  98. ("python-html5lib" ,python-html5lib)
  99. ("python-mock" ,python-mock)
  100. ("python-nose" ,python-nose)
  101. ("python-pytest" ,python-pytest)))
  102. (home-page "https://www.sphinx-doc.org")
  103. (synopsis "Python documentation generator")
  104. (description "Sphinx is a tool that makes it easy to create documentation
  105. for Python projects or other documents consisting of multiple reStructuredText
  106. sources.")
  107. (license license:bsd-2)
  108. (properties `((python2-variant . ,(delay python2-sphinx))))))
  109. ;; Sphinx 2 does not support Python 2, so we stick with this older version here.
  110. (define-public python2-sphinx
  111. (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
  112. (package
  113. (inherit base)
  114. (version "1.7.7")
  115. (source (origin
  116. (method url-fetch)
  117. (uri (pypi-uri "Sphinx" version))
  118. (sha256
  119. (base32
  120. "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
  121. (arguments
  122. (substitute-keyword-arguments (package-arguments base)
  123. ((#:phases phases)
  124. `(modify-phases ,phases
  125. (add-before 'check 'disable-broken-tests
  126. (lambda _
  127. (for-each delete-file
  128. ;; These tests are broken when using Python2:
  129. ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
  130. '("tests/test_api_translator.py"
  131. "tests/test_setup_command.py"
  132. ;; This one fails for unknown reasons.
  133. "tests/test_correct_year.py"))))))))
  134. (native-inputs `(("python2-mock" ,python2-mock)
  135. ("python2-enum34" ,python2-enum34)
  136. ,@(package-native-inputs base)))
  137. ;; Sphinx 2 has some dependencies that do not support Python 2, so
  138. ;; we keep our own propagated-inputs here instead of inheriting.
  139. (propagated-inputs
  140. `(("python2-pytz" ,python2-pytz)
  141. ("python2-typing" ,python2-typing)
  142. ("python2-imagesize" ,python2-imagesize)
  143. ("python2-sphinx-alabaster-theme" ,python2-sphinx-alabaster-theme)
  144. ("python2-babel" ,python2-babel)
  145. ("python2-snowballstemmer" ,python2-snowballstemmer)
  146. ("python2-docutils" ,python2-docutils-0.14)
  147. ("python2-jinja2" ,python2-jinja2)
  148. ("python2-packaging" ,python2-packaging)
  149. ("python2-pygments" ,python2-pygments)
  150. ("python2-requests" ,python2-requests)
  151. ("python2-six" ,python2-six)
  152. ("python2-sphinxcontrib-websupport" ,python2-sphinxcontrib-websupport))))))
  153. (define-public python-sphinxcontrib-applehelp
  154. (package
  155. (name "python-sphinxcontrib-applehelp")
  156. (version "1.0.2")
  157. (source (origin
  158. (method url-fetch)
  159. (uri (pypi-uri "sphinxcontrib-applehelp" version))
  160. (sha256
  161. (base32
  162. "0n5wrn4l7x6gxvi1g7c6y72hkxgc223axz1jykipaxhfr1g76wm0"))))
  163. (build-system python-build-system)
  164. (arguments
  165. `(#:tests? #f)) ;XXX: circular dependency on Sphinx
  166. (home-page "https://github.com/sphinx-doc/sphinxcontrib-applehelp")
  167. (synopsis "Sphinx extension for creating Apple help books")
  168. (description
  169. "@code{sphinxcontrib-applehelp} is a Sphinx extension which outputs
  170. Apple help books.")
  171. (license license:bsd-2)))
  172. (define-public python-sphinx-copybutton
  173. (package
  174. (name "python-sphinx-copybutton")
  175. (version "0.2.6")
  176. (source
  177. (origin
  178. (method url-fetch)
  179. (uri (pypi-uri "sphinx-copybutton" version))
  180. (sha256
  181. (base32
  182. "0ny9jpygj93z8jyjpi4v6jjz90pmns74s389wq16igzzq2mpgfjm"))))
  183. (build-system python-build-system)
  184. (arguments
  185. `(#:tests? #f)) ; XXX: Check requires network access.
  186. (propagated-inputs
  187. `(("python-flit" ,python-flit)
  188. ("python-setuptools" ,python-setuptools)
  189. ("python-sphinx" ,python-sphinx)
  190. ("python-wheel" ,python-wheel)))
  191. (home-page "https://github.com/choldgraf/sphinx-copybutton")
  192. (synopsis "Sphinx extension to add \"copy\" buttons to code blocks")
  193. (description
  194. "This package provides a small sphinx extension to add \"copy\" buttons
  195. to code blocks.")
  196. (license license:expat)))
  197. (define-public python-sphinxcontrib-devhelp
  198. (package
  199. (name "python-sphinxcontrib-devhelp")
  200. (version "1.0.2")
  201. (source (origin
  202. (method url-fetch)
  203. (uri (pypi-uri "sphinxcontrib-devhelp" version))
  204. (sha256
  205. (base32
  206. "1r1qngsbjqbg4rj93kpj44qqy7n4x5khldkr0c3ffhlnggx1lzzz"))))
  207. (build-system python-build-system)
  208. (arguments
  209. `(#:tests? #f)) ;XXX: circular dependency on Sphinx
  210. (home-page "https://github.com/sphinx-doc/sphinxcontrib-devhelp")
  211. (synopsis "Sphinx extension for creating Devhelp documents")
  212. (description
  213. "@code{sphinxcontrib-devhelp} is a Sphinx extension which outputs
  214. @url{Devhelp,https://wiki.gnome.org/Apps/Devhelp} documents.")
  215. (license license:bsd-2)))
  216. (define-public python-sphinxcontrib-github-alt
  217. (package
  218. (name "python-sphinxcontrib-github-alt")
  219. (version "1.2")
  220. (source
  221. (origin
  222. (method url-fetch)
  223. (uri (pypi-uri "sphinxcontrib_github_alt" version))
  224. (sha256
  225. (base32
  226. "1x9af78vamjjcdrrhiah3wg613jv7gm8yh9vvqfrmf4vam6mimyg"))))
  227. (build-system python-build-system)
  228. (propagated-inputs
  229. `(("python-docutils" ,python-docutils)
  230. ("python-sphinx" ,python-sphinx)))
  231. (home-page "https://github.com/jupyter/sphinxcontrib_github_alt")
  232. (synopsis "Link to GitHub pages from Sphinx docs")
  233. (description
  234. "This package lets you link to GitHub issues, pull requests, commits and
  235. users from Sphinx docs.")
  236. (license license:bsd-2)))
  237. (define-public python-sphinxcontrib-htmlhelp
  238. (package
  239. (name "python-sphinxcontrib-htmlhelp")
  240. (version "1.0.3")
  241. (source (origin
  242. (method url-fetch)
  243. (uri (pypi-uri "sphinxcontrib-htmlhelp" version))
  244. (sha256
  245. (base32
  246. "16v5jdnibwrqjdr5aqchgyzpwy3rgamwhdf4kidv5nxj65zbpxg8"))))
  247. (build-system python-build-system)
  248. (arguments
  249. `(#:tests? #f)) ;XXX: circular dependency on Sphinx
  250. (home-page "https://github.com/sphinx-doc/sphinxcontrib-htmlhelp")
  251. (synopsis "Sphinx extension for rendering HTML help files")
  252. (description
  253. "@code{sphinxcontrib-htmlhelp} is a Sphinx extension which renders
  254. HTML help files.")
  255. (license license:bsd-2)))
  256. (define-public python-sphinxcontrib-jsmath
  257. (package
  258. (name "python-sphinxcontrib-jsmath")
  259. (version "1.0.1")
  260. (source (origin
  261. (method url-fetch)
  262. (uri (pypi-uri "sphinxcontrib-jsmath" version))
  263. (sha256
  264. (base32
  265. "1f64w19j33sp151jimibraw6qrbhd5gxy8hs3797w9478m55x4m9"))))
  266. (build-system python-build-system)
  267. (arguments
  268. `(#:tests? #f)) ;XXX: circular dependency on Sphinx
  269. (home-page "https://github.com/sphinx-doc/sphinxcontrib-jsmath")
  270. (synopsis "Sphinx extension to render math equations")
  271. (description
  272. "@code{sphinxcontrib-jsmath} is a Sphinx extension which renders display
  273. math in HTML via JavaScript.")
  274. (license license:bsd-2)))
  275. (define-public python-sphinxcontrib-newsfeed
  276. (package
  277. (name "python-sphinxcontrib-newsfeed")
  278. (version "0.1.4")
  279. (source (origin
  280. (method url-fetch)
  281. (uri (pypi-uri "sphinxcontrib-newsfeed" version))
  282. (sha256
  283. (base32
  284. "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
  285. (arguments '(#:tests? #f)) ; No tests.
  286. (build-system python-build-system)
  287. (propagated-inputs
  288. `(("python-sphinx" ,python-sphinx)))
  289. (synopsis "News Feed extension for Sphinx")
  290. (description "Sphinxcontrib-newsfeed is an extension for adding a simple
  291. Blog, News or Announcements section to a Sphinx website.")
  292. (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
  293. (license license:bsd-2)))
  294. (define-public python-sphinxcontrib-programoutput
  295. (package
  296. (name "python-sphinxcontrib-programoutput")
  297. (version "0.15")
  298. (source (origin
  299. (method url-fetch)
  300. (uri (pypi-uri "sphinxcontrib-programoutput" version))
  301. (sha256
  302. (base32
  303. "155bz0z2cz544pphkd3nk7ph83mz7nn0ql135kzi62kqmd75ppc0"))))
  304. (build-system python-build-system)
  305. (arguments
  306. ;; FIXME: Many tests are failing.
  307. '(#:tests? #f))
  308. (propagated-inputs
  309. `(("python-sphinx" ,python-sphinx)))
  310. (synopsis "Sphinx extension to include program output")
  311. (description "A Sphinx extension to literally insert the output of arbitrary
  312. commands into documents, helping you to keep your command examples up to date.")
  313. (home-page "https://github.com/NextThought/sphinxcontrib-programoutput")
  314. (license license:bsd-2)))
  315. (define-public python2-sphinxcontrib-programoutput
  316. (package-with-python2 python-sphinxcontrib-programoutput))
  317. (define-public python-sphinxcontrib-qthelp
  318. (package
  319. (name "python-sphinxcontrib-qthelp")
  320. (version "1.0.3")
  321. (source (origin
  322. (method url-fetch)
  323. (uri (pypi-uri "sphinxcontrib-qthelp" version))
  324. (sha256
  325. (base32
  326. "0wjsp96d262shzkx7pb7pra7mmf0j8c5rz56i6x0vdsqw1z7ccsc"))))
  327. (build-system python-build-system)
  328. (arguments
  329. `(#:tests? #f)) ;XXX: circular dependency on Sphinx
  330. (home-page "https://github.com/sphinx-doc/sphinxcontrib-qthelp")
  331. (synopsis "Sphinx extension to output QtHelp documents")
  332. (description
  333. "@code{sphinxcontrib-qthelp} is a Sphinx extension which outputs QtHelp
  334. documents.")
  335. (license license:bsd-2)))
  336. (define-public python-sphinxcontrib-serializinghtml
  337. (package
  338. (name "python-sphinxcontrib-serializinghtml")
  339. (version "1.1.4")
  340. (source (origin
  341. (method url-fetch)
  342. (uri (pypi-uri "sphinxcontrib-serializinghtml" version))
  343. (sha256
  344. (base32
  345. "1g3pbx0g88zd9xzcrbaypa2k60axrh92vf5j76wsk0p9hv6fr87a"))))
  346. (build-system python-build-system)
  347. (arguments
  348. `(#:tests? #f)) ;XXX: circular dependency on Sphinx
  349. (home-page "https://github.com/sphinx-doc/sphinxcontrib-serializinghtml")
  350. (synopsis "Sphinx extension to serialize HTML files")
  351. (description
  352. "@code{sphinxcontrib-serializinghtml} is a Sphinx extension which outputs
  353. \"serialized\" HTML files.")
  354. (license license:bsd-2)))
  355. (define-public python-sphinxcontrib-svg2pdfconverter
  356. (package
  357. (name "python-sphinxcontrib-svg2pdfconverter")
  358. (version "1.0.1")
  359. (source (origin
  360. (method url-fetch)
  361. (uri (pypi-uri "sphinxcontrib-svg2pdfconverter" version))
  362. (sha256
  363. (base32
  364. "1hhaxmqc7wh8gnyw5jaqckliknvk0p21y12wk3bdmncgkaf9ar8f"))))
  365. (build-system python-build-system)
  366. (propagated-inputs
  367. `(("python-sphinx" ,python-sphinx)))
  368. (home-page "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter")
  369. (synopsis "Sphinx SVG to PDF converter extension")
  370. (description "A Sphinx extension to convert SVG images to PDF in case the
  371. builder does not support SVG images natively (e.g. LaTeX).")
  372. (license license:bsd-2)))
  373. (define-public python-sphinxcontrib-websupport
  374. (package
  375. (name "python-sphinxcontrib-websupport")
  376. (version "1.2.0")
  377. (source (origin
  378. (method url-fetch)
  379. (uri (pypi-uri "sphinxcontrib-websupport" version))
  380. (sha256
  381. (base32
  382. "1smma7r0rhwcmbfvvkfs5djfz1qm8wbpcvp084ca6dmw2b9zplxs"))))
  383. (build-system python-build-system)
  384. (arguments
  385. ;; FIXME: Tests depend on Sphinx, which depends on this.
  386. `(#:tests? #f))
  387. (home-page "https://sphinx-doc.org/")
  388. (synopsis "Sphinx API for web applications")
  389. (description "This package provides a Python API to easily integrate
  390. Sphinx documentation into your web application. It provides tools to
  391. integrate Sphinx documents in web templates and to handle searches.")
  392. (license license:bsd-3)))
  393. (define-public python2-sphinxcontrib-websupport
  394. (package-with-python2 python-sphinxcontrib-websupport))
  395. (define-public python-sphinx-gallery
  396. (package
  397. (name "python-sphinx-gallery")
  398. (version "0.9.0")
  399. (source
  400. (origin
  401. (method url-fetch)
  402. (uri (pypi-uri "sphinx-gallery" version))
  403. (sha256
  404. (base32 "14zyhr7m92nafhhnzfvnbgkf5m91krd9mjyi24zn59bjq6zyr8hl"))))
  405. (build-system python-build-system)
  406. (arguments
  407. `(#:phases
  408. (modify-phases %standard-phases
  409. (add-before 'check 'writable-files-for-tests
  410. (lambda _
  411. (for-each make-file-writable (find-files "."))))
  412. (replace 'check
  413. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  414. (when tests?
  415. (add-installed-pythonpath inputs outputs)
  416. (invoke "python" "-m" "pytest" "--pyargs" "sphinx_gallery" "-k"
  417. (string-append
  418. ;; These tests require online data.
  419. "not test_embed_code_links_get_data"
  420. " and not test_run_sphinx"
  421. ;; AssertionError.
  422. " and not test_embed_links_and_styles"))))))))
  423. (native-inputs
  424. `(("python-joblib" ,python-joblib)
  425. ("python-matplotlib" ,python-matplotlib)
  426. ("python-numpy" ,python-numpy)
  427. ("python-pillow" ,python-pillow)
  428. ("python-pytest" ,python-pytest)
  429. ("python-pytest-cov" ,python-pytest-cov)
  430. ("python-sphinx" ,python-sphinx)))
  431. (home-page "https://sphinx-gallery.github.io/stable/index.html")
  432. (synopsis "Generate an examples gallery automatically")
  433. (description
  434. "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
  435. from any set of Python scripts and puts it into an examples gallery.")
  436. (license license:bsd-3)))
  437. (define-public python-sphinx-me
  438. (package
  439. (name "python-sphinx-me")
  440. (version "0.3")
  441. (source
  442. (origin
  443. (method url-fetch)
  444. (uri (pypi-uri "sphinx-me" version))
  445. (sha256
  446. (base32
  447. "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
  448. (build-system python-build-system)
  449. (home-page "https://github.com/stephenmcd/sphinx-me")
  450. (synopsis "Create a Sphinx documentation shell")
  451. (description
  452. "Create a Sphinx documentation shell for your project and include the
  453. README file as the documentation index. It handles extracting the required
  454. meta data such as the project name, author and version from your project for
  455. use in your Sphinx docs.")
  456. (license license:bsd-2)))
  457. (define-public python2-sphinx-me
  458. (package-with-python2 python-sphinx-me))
  459. (define-public python-sphinx-repoze-autointerface
  460. (package
  461. (name "python-sphinx-repoze-autointerface")
  462. (version "0.8")
  463. (source (origin
  464. (method url-fetch)
  465. (uri (pypi-uri "repoze.sphinx.autointerface" version))
  466. (sha256
  467. (base32
  468. "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
  469. (build-system python-build-system)
  470. (arguments '(#:tests? #f)) ; No tests.
  471. (propagated-inputs
  472. `(("python-sphinx" ,python-sphinx)
  473. ("python-zope-interface" ,python-zope-interface)))
  474. (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
  475. (description "This package defines an extension for the Sphinx documentation
  476. system. The extension allows generation of API documentation by
  477. introspection of @code{zope.interface} instances in code.")
  478. (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
  479. (license license:repoze)))
  480. (define-public python2-sphinx-repoze-autointerface
  481. (package-with-python2 python-sphinx-repoze-autointerface))
  482. (define-public python-sphinx-alabaster-theme
  483. (package
  484. (name "python-sphinx-alabaster-theme")
  485. (version "0.7.12")
  486. (source (origin
  487. (method url-fetch)
  488. (uri (pypi-uri "alabaster" version))
  489. (sha256
  490. (base32
  491. "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
  492. (build-system python-build-system)
  493. (propagated-inputs
  494. `(("python-pygments" ,python-pygments)))
  495. (home-page "https://alabaster.readthedocs.io/")
  496. (synopsis "Configurable sidebar-enabled Sphinx theme")
  497. (description "Alabaster is a visually (c)lean, responsive, configurable
  498. theme for the Sphinx documentation system. It's the default theme of Sphinx.")
  499. (license license:bsd-3)))
  500. (define-public python2-sphinx-alabaster-theme
  501. (package-with-python2 python-sphinx-alabaster-theme))
  502. (define-public python-sphinx-argparse
  503. (package
  504. (name "python-sphinx-argparse")
  505. (version "0.2.5")
  506. (source
  507. (origin
  508. (method url-fetch)
  509. (uri (pypi-uri "sphinx-argparse" version))
  510. (sha256
  511. (base32 "05wc8f5hb3jsg2vh2jf7jsyan8d4i09ifrz2c8fp6f7x1zw9iav0"))))
  512. (build-system python-build-system)
  513. (propagated-inputs
  514. `(("python-sphinx" ,python-sphinx)))
  515. (native-inputs
  516. `(("python-commonmark" ,python-commonmark)
  517. ("python-pytest" ,python-pytest)
  518. ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
  519. (home-page "https://github.com/ribozz/sphinx-argparse")
  520. (synopsis "Sphinx extension for documenting argparse commands and options")
  521. (description
  522. "This package is a sphinx extension that automatically documents
  523. argparse commands and options")
  524. (license license:expat)))
  525. (define-public python-sphinx-cloud-sptheme
  526. (package
  527. (name "python-sphinx-cloud-sptheme")
  528. (version "1.8.0")
  529. (source (origin
  530. (method url-fetch)
  531. (uri (pypi-uri "cloud_sptheme" version))
  532. (sha256
  533. (base32
  534. "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
  535. (build-system python-build-system)
  536. ;; FIXME: The 'pypi' release archive does not contain tests.
  537. (arguments '(#:tests? #f))
  538. (native-inputs
  539. `(("python-sphinx" ,python-sphinx)))
  540. (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
  541. (synopsis "'Cloud' theme for Sphinx documenter")
  542. (description "This package contains the \"Cloud\" theme for Sphinx and some
  543. related extensions.")
  544. (license license:bsd-3)))
  545. (define-public python2-sphinx-cloud-sptheme
  546. (package-with-python2 python-sphinx-cloud-sptheme))
  547. (define-public python-guzzle-sphinx-theme
  548. (package
  549. (name "python-guzzle-sphinx-theme")
  550. (version "0.7.11")
  551. (source
  552. (origin
  553. (method url-fetch)
  554. (uri (pypi-uri "guzzle_sphinx_theme" version))
  555. (sha256
  556. (base32
  557. "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
  558. (build-system python-build-system)
  559. (propagated-inputs
  560. `(("python-sphinx" ,python-sphinx)))
  561. (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
  562. (synopsis "Sphinx theme used by Guzzle")
  563. (description "This package provides guzzle_sphinx_theme, a theme for the
  564. Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
  565. and several other projects.")
  566. (license license:expat)))
  567. (define-public python2-guzzle-sphinx-theme
  568. (package-with-python2 python-guzzle-sphinx-theme))
  569. (define-public python-sphinx-rtd-theme
  570. (package
  571. (name "python-sphinx-rtd-theme")
  572. (version "0.2.4")
  573. (source
  574. (origin
  575. (method url-fetch)
  576. (uri (pypi-uri "sphinx_rtd_theme" version))
  577. (sha256
  578. (base32
  579. "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
  580. (build-system python-build-system)
  581. (arguments '(#:tests? #f)) ; No tests.
  582. (propagated-inputs
  583. `(("python-sphinx" ,python-sphinx)))
  584. (home-page "https://github.com/snide/sphinx_rtd_theme/")
  585. (synopsis "ReadTheDocs.org theme for Sphinx")
  586. (description "A theme for Sphinx used by ReadTheDocs.org.")
  587. (license license:expat)))
  588. (define-public python2-sphinx-rtd-theme
  589. (package-with-python2 python-sphinx-rtd-theme))
  590. (define-public python-breathe
  591. (package
  592. (name "python-breathe")
  593. (version "4.30.0")
  594. (source
  595. (origin
  596. (method url-fetch)
  597. (uri (pypi-uri "breathe" version))
  598. (sha256
  599. (base32
  600. "055h95fkdld7s49878fqjx1nri1drj1czc184vrb7i60mf2yqg9n"))))
  601. (build-system python-build-system)
  602. (propagated-inputs
  603. `(("python-docutils" ,python-docutils)
  604. ("python-sphinx" ,python-sphinx)))
  605. (home-page "https://github.com/michaeljones/breathe")
  606. (synopsis "ReStructuredText and Sphinx bridge to Doxygen")
  607. (description "This package is an extension to reStructuredText and Sphinx
  608. to be able to read and render the Doxygen xml output.")
  609. (license license:bsd-3)))
  610. (define-public python-sphinx-intl
  611. (package
  612. (name "python-sphinx-intl")
  613. (version "2.0.1")
  614. (source
  615. (origin
  616. (method url-fetch)
  617. (uri (pypi-uri "sphinx-intl" version))
  618. (sha256
  619. (base32 "1d1q0sanjp4nkfvhsxi75zf3xjyyi8nzxvl3v7l0jy9ld70nwnmj"))))
  620. (build-system python-build-system)
  621. (propagated-inputs
  622. `(("python-sphinx" ,python-sphinx)
  623. ("python-click" ,python-click)))
  624. (home-page "https://github.com/sphinx-doc/sphinx-intl")
  625. (synopsis
  626. "Sphinx utility that makes it easy to translate and to apply translation")
  627. (description
  628. "A utility tool that provides several features that make it easy to
  629. translate and to apply translation to Sphinx generated document.")
  630. (license license:bsd-2)))
  631. (define-public python-sphinx-autobuild
  632. (package
  633. (name "python-sphinx-autobuild")
  634. (version "0.7.1")
  635. (source
  636. (origin
  637. (method url-fetch)
  638. (uri (pypi-uri "sphinx-autobuild" version))
  639. (sha256
  640. (base32
  641. "0kn753dyh3b1s0h77lbk704niyqc7bamvq6v3s1f6rj6i20qyf36"))))
  642. (build-system python-build-system)
  643. (arguments
  644. `(#:phases
  645. (modify-phases %standard-phases
  646. ;; See https://github.com/GaretJax/sphinx-autobuild/pull/72
  647. (add-after 'unpack 'use-later-port-for
  648. (lambda _
  649. (substitute* "requirements.txt"
  650. (("port_for==.*") "port_for\n"))
  651. #t))
  652. (delete 'check)
  653. (add-after 'install 'check
  654. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  655. (when tests?
  656. (add-installed-pythonpath inputs outputs)
  657. (invoke "pytest" "-v"))
  658. #t)))))
  659. (propagated-inputs
  660. `(("python-argh" ,python-argh)
  661. ("python-livereload" ,python-livereload)
  662. ("python-pathtools" ,python-pathtools)
  663. ("python-port-for" ,python-port-for)
  664. ("python-pyyaml" ,python-pyyaml)
  665. ("python-tornado" ,python-tornado)
  666. ("python-watchdog" ,python-watchdog)))
  667. (native-inputs
  668. `(("python-pytest" ,python-pytest)))
  669. (home-page "https://github.com/GaretJax/sphinx-autobuild")
  670. (synopsis "Rebuild Sphinx documentation when a change is detected")
  671. (description
  672. "This package lets you watch a Sphinx directory and rebuild the
  673. documentation when a change is detected. It also includes a livereload
  674. enabled web server.")
  675. (license license:expat)))
  676. (define-public python-sphinx-autodoc-typehints
  677. (package
  678. (name "python-sphinx-autodoc-typehints")
  679. (version "1.11.1")
  680. (source
  681. (origin
  682. (method url-fetch)
  683. (uri (pypi-uri "sphinx-autodoc-typehints" version))
  684. (sha256
  685. (base32
  686. "086v9mg21pvfx0lfqjx2xf36hnzrsripfg345xi59f7xwb9scjr4"))))
  687. (build-system python-build-system)
  688. (propagated-inputs
  689. `(("python-setuptools-scm" ,python-setuptools-scm)
  690. ("python-sphinx" ,python-sphinx)))
  691. (native-inputs
  692. `(("python-dataclasses" ,python-dataclasses)
  693. ("python-pytest" ,python-pytest)
  694. ("python-sphinx" ,python-sphinx)
  695. ("python-sphobjinv" ,python-sphobjinv)
  696. ("python-typing-extensions" ,python-typing-extensions)))
  697. (home-page "https://pypi.org/project/sphinx-autodoc-typehints/")
  698. (synopsis "Type hints for the Sphinx autodoc extension")
  699. (description "This extension allows you to use Python 3 annotations for
  700. documenting acceptable argument types and return value types of functions.")
  701. (license license:expat)))
  702. (define-public python-nbsphinx
  703. (package
  704. (name "python-nbsphinx")
  705. (version "0.7.1")
  706. (source
  707. (origin
  708. (method url-fetch)
  709. (uri (pypi-uri "nbsphinx" version))
  710. (sha256
  711. (base32
  712. "0j56bxdj08vn3q1804qwb1ywhga1mdg1awgm7i64wfpfwi8df2zm"))))
  713. (build-system python-build-system)
  714. (propagated-inputs
  715. `(("python-docutils" ,python-docutils)
  716. ("python-jinja2" ,python-jinja2)
  717. ("python-nbconvert" ,python-nbconvert)
  718. ("python-nbformat" ,python-nbformat)
  719. ("python-sphinx" ,python-sphinx)
  720. ("python-traitlets" ,python-traitlets)))
  721. (home-page "https://nbsphinx.readthedocs.io/")
  722. (synopsis "Jupyter Notebook Tools for Sphinx")
  723. (description "@code{python-nbsphinx} is a Sphinx extension that
  724. provides a source parser for @code{*.ipynb} files. Custom Sphinx
  725. directives are used to show Jupyter Notebook code cells (and of course
  726. their results) in both HTML and LaTeX output. Un-evaluated notebooks
  727. - i.e. notebooks without stored output cells - will be automatically
  728. executed during the Sphinx build process.")
  729. (license license:expat)))
  730. (define-public python-sphobjinv
  731. (package
  732. (name "python-sphobjinv")
  733. (version "2.0.1")
  734. (source
  735. (origin
  736. (method url-fetch)
  737. (uri (pypi-uri "sphobjinv" version))
  738. (sha256
  739. (base32
  740. "126lgm54c94ay3fci512ap4l607gak90pbz0fk98syxvj5izrrzx"))))
  741. (build-system python-build-system)
  742. (propagated-inputs
  743. `(("python-attrs" ,python-attrs)
  744. ("python-certifi" ,python-certifi)
  745. ("python-fuzzywuzzy" ,python-fuzzywuzzy)
  746. ("python-jsonschema" ,python-jsonschema)
  747. ("python-levenshtein" ,python-levenshtein)))
  748. (home-page "https://github.com/bskinn/sphobjinv")
  749. (synopsis "Sphinx cross-reference tool")
  750. (description "Sphinx objects.inv inspection/manipulation tool.")
  751. (license license:expat)))
  752. (define-public python-jupyter-sphinx
  753. (package
  754. (name "python-jupyter-sphinx")
  755. (version "0.3.2")
  756. (source
  757. (origin
  758. (method url-fetch)
  759. (uri (pypi-uri "jupyter_sphinx" version))
  760. (sha256
  761. (base32
  762. "1wma60787m2451nn4bc4jw7bzqksplplb84wqxm34iaw70499z1p"))))
  763. (build-system python-build-system)
  764. (propagated-inputs
  765. `(("python-ipython" ,python-ipython)
  766. ("python-ipywidgets" ,python-ipywidgets)
  767. ("python-nbconvert" ,python-nbconvert)
  768. ("python-nbformat" ,python-nbformat)))
  769. (native-inputs
  770. `(("python-sphinx" ,python-sphinx)))
  771. (home-page "https://github.com/jupyter/jupyter-sphinx/")
  772. (synopsis "Jupyter Sphinx Extensions")
  773. (description
  774. "Jupyter-sphinx is a Sphinx extension that executes embedded code in a
  775. Jupyter kernel, and embeds outputs of that code in the document. It has
  776. support for rich output such as images, LaTeX math and even JavaScript
  777. widgets, and supports thebelab for live code execution with minimal effort.")
  778. (license license:bsd-3)))
  779. (define-public python-sphinxcontrib-autoprogram
  780. (package
  781. (name "python-sphinxcontrib-autoprogram")
  782. (version "0.1.7")
  783. (source
  784. (origin
  785. (method url-fetch)
  786. (uri (pypi-uri "sphinxcontrib-autoprogram" version))
  787. (sha256
  788. (base32
  789. "06hzim0d3fd72kf30fyjbbm5n8ibyybic0kf62gm79qp50zjwr5w"))))
  790. (build-system python-build-system)
  791. (propagated-inputs
  792. `(("python-six" ,python-six)))
  793. (native-inputs
  794. `(("python-sphinx" ,python-sphinx)))
  795. (home-page "https://github.com/sphinx-contrib/autoprogram")
  796. (synopsis "Documenting CLI programs")
  797. (description
  798. "This Sphinx extension, @code{sphinxcontrib.autoprogram}, provides an
  799. automated way to document command-line programs. It scans
  800. @code{argparse.ArgumentParser} object, and then expands it into a set of
  801. @code{.. program::} and @code{.. option::} directives.")
  802. (license license:bsd-2)))
  803. (define-public python-pydata-sphinx-theme
  804. (package
  805. (name "python-pydata-sphinx-theme")
  806. (version "0.6.3")
  807. (source
  808. (origin
  809. (method url-fetch)
  810. (uri (pypi-uri "pydata-sphinx-theme" version))
  811. (sha256
  812. (base32
  813. "055bh3hyh72pafiylvgpsjlk18wm15gg4azc5rjlsww5z475iq1j"))))
  814. (build-system python-build-system)
  815. (propagated-inputs
  816. `(("python-beautifulsoup4" ,python-beautifulsoup4)))
  817. (native-inputs
  818. `(("python-beautifulsoup4" ,python-beautifulsoup4)
  819. ("python-docutils" ,python-docutils)
  820. ("python-jupyter-sphinx" ,python-jupyter-sphinx)
  821. ("python-numpy" ,python-numpy)
  822. ("python-numpydoc" ,python-numpydoc)
  823. ("python-pandas" ,python-pandas)
  824. ("python-plotly" ,python-plotly)
  825. ("python-pytest" ,python-pytest)
  826. ("python-pytest-regressions"
  827. ,python-pytest-regressions)
  828. ("python-recommonmark" ,python-recommonmark)
  829. ("python-sphinx" ,python-sphinx)
  830. ("python-xarray" ,python-xarray)
  831. ("python-docutils" ,python-docutils)
  832. ("python-sphinx" ,python-sphinx)))
  833. (home-page "https://github.com/pydata/pydata-sphinx-theme")
  834. (synopsis "Bootstrap-based Sphinx theme")
  835. (description
  836. "This package provides a Bootstrap-based Sphinx theme from the PyData
  837. community.")
  838. (license license:bsd-3)))