1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 David Thompson <davet@gnu.org>
3 ;;; Copyright © 2015, 2017, 2019 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 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
10 ;;; Copyright © 2017 Christopher Allan Webber <cwebber@dustycloud.org>
11 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
12 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
14 ;;; Copyright © 2019 Alexandros Theodotou <alex@zrythm.org>
15 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages sphinx)
33 #:use-module (guix packages)
34 #:use-module (guix download)
35 #:use-module (guix git-download)
36 #:use-module (guix utils)
37 #:use-module (guix build-system python)
38 #:use-module ((guix licenses) #:prefix license:)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages check)
41 #:use-module (gnu packages graphviz)
42 #:use-module (gnu packages image)
43 #:use-module (gnu packages imagemagick)
44 #:use-module (gnu packages python-web)
45 #:use-module (gnu packages python-xyz)
46 #:use-module (gnu packages time))
48 (define-public python-sphinx
50 (name "python-sphinx")
55 (uri (pypi-uri "Sphinx" version))
58 "19a28nsb0w4bs6k8rdfyk6vzrcwdpvhs2wq77rgpmww59yvndrz6"))))
59 (build-system python-build-system)
62 (modify-phases %standard-phases
65 ;; Requires Internet access.
66 (delete-file "tests/test_build_linkcheck.py")
67 (substitute* "tests/test_build_latex.py"
68 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
69 "@pytest.mark.skip()"))
70 (invoke "make" "test"))))))
72 `(("python-babel" ,python-babel)
73 ("python-docutils" ,python-docutils)
74 ("python-jinja2" ,python-jinja2)
75 ("python-imagesize" ,python-imagesize)
76 ("python-packaging" ,python-packaging)
77 ("python-pygments" ,python-pygments)
78 ("python-requests" ,python-requests)
79 ("python-snowballstemmer" ,python-snowballstemmer)
80 ("python-sphinx-alabaster-theme"
81 ,python-sphinx-alabaster-theme)
82 ("python-sphinxcontrib-applehelp" ,python-sphinxcontrib-applehelp)
83 ("python-sphinxcontrib-devhelp" ,python-sphinxcontrib-devhelp)
84 ("python-sphinxcontrib-htmlhelp" ,python-sphinxcontrib-htmlhelp)
85 ("python-sphinxcontrib-jsmath" ,python-sphinxcontrib-jsmath)
86 ("python-sphinxcontrib-qthelp" ,python-sphinxcontrib-qthelp)
87 ("python-sphinxcontrib-serializinghtml"
88 ,python-sphinxcontrib-serializinghtml)))
90 `(("graphviz" ,graphviz)
91 ("imagemagick" ,imagemagick) ;for "convert"
92 ("python-html5lib" ,python-html5lib)
93 ("python-mock" ,python-mock)
94 ("python-nose" ,python-nose)
95 ("python-pytest" ,python-pytest)))
96 (home-page "http://www.sphinx-doc.org")
97 (synopsis "Python documentation generator")
98 (description "Sphinx is a tool that makes it easy to create documentation
99 for Python projects or other documents consisting of multiple reStructuredText
101 (license license:bsd-2)
102 (properties `((python2-variant . ,(delay python2-sphinx))))))
104 ;; Sphinx 2 does not support Python 2, so we stick with this older version here.
105 ;; Remove this package once python2-pbcore no longer requires it.
106 (define-public python2-sphinx
107 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
113 (uri (pypi-uri "Sphinx" version))
116 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
118 (substitute-keyword-arguments (package-arguments base)
120 `(modify-phases ,phases
121 (add-before 'check 'disable-broken-tests
123 ;; These tests are broken when using Python2:
124 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
125 (for-each delete-file '("tests/test_api_translator.py"
126 "tests/test_setup_command.py"))
128 (native-inputs `(("python2-mock" ,python2-mock)
129 ("python2-enum34" ,python2-enum34)
130 ,@(package-native-inputs base)))
131 ;; Sphinx 2 has some dependencies that do not support Python 2, so
132 ;; we keep our own propagated-inputs here instead of inheriting.
133 (propagated-inputs `(("python2-pytz" ,python2-pytz)
134 ("python2-typing" ,python2-typing)
135 ("python2-imagesize" ,python2-imagesize)
136 ("python2-sphinx-alabaster-theme"
137 ,python2-sphinx-alabaster-theme)
138 ("python2-babel" ,python2-babel-2.6)
139 ("python2-snowballstemmer" ,python2-snowballstemmer)
140 ("python2-docutils" ,python2-docutils)
141 ("python2-jinja2" ,python2-jinja2)
142 ("python2-packaging" ,python2-packaging)
143 ("python2-pygments" ,python2-pygments)
144 ("python2-requests" ,python2-requests)
145 ("python2-six" ,python2-six)
146 ("python2-sphinxcontrib-websupport"
147 ,python2-sphinxcontrib-websupport))))))
149 (define-public python-sphinxcontrib-applehelp
151 (name "python-sphinxcontrib-applehelp")
155 (uri (pypi-uri "sphinxcontrib-applehelp" version))
158 "15rqmgphj4wqf4m5wnzxgmwxx5jwfzb0j0nb94ql0x5wnar0mapd"))))
159 (build-system python-build-system)
161 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
162 (home-page "https://github.com/sphinx-doc/sphinxcontrib-applehelp")
163 (synopsis "Sphinx extension for creating Apple help books")
165 "@code{sphinxcontrib-applehelp} is a Sphinx extension which outputs
167 (license license:bsd-2)))
169 (define-public python-sphinx-copybutton
171 (name "python-sphinx-copybutton")
176 (uri (pypi-uri "sphinx-copybutton" version))
179 "0ny9jpygj93z8jyjpi4v6jjz90pmns74s389wq16igzzq2mpgfjm"))))
180 (build-system python-build-system)
182 `(#:tests? #f)) ; XXX: Check requires network access.
184 `(("python-flit" ,python-flit)
185 ("python-setuptools" ,python-setuptools)
186 ("python-sphinx" ,python-sphinx)
187 ("python-wheel" ,python-wheel)))
188 (home-page "https://github.com/choldgraf/sphinx-copybutton")
189 (synopsis "Sphinx extension to add \"copy\" buttons to code blocks")
191 "This package provides a small sphinx extension to add \"copy\" buttons
193 (license license:expat)))
195 (define-public python-sphinxcontrib-devhelp
197 (name "python-sphinxcontrib-devhelp")
201 (uri (pypi-uri "sphinxcontrib-devhelp" version))
204 "0d2a57kqxl72i55rns0ly1i044y2x234b9sdi89ajc3kjdvv0r3c"))))
205 (build-system python-build-system)
207 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
208 (home-page "https://github.com/sphinx-doc/sphinxcontrib-devhelp")
209 (synopsis "Sphinx extension for creating Devhelp documents")
211 "@code{sphinxcontrib-devhelp} is a Sphinx extension which outputs
212 @url{Devhelp,https://wiki.gnome.org/Apps/Devhelp} documents.")
213 (license license:bsd-2)))
215 (define-public python-sphinxcontrib-htmlhelp
217 (name "python-sphinxcontrib-htmlhelp")
221 (uri (pypi-uri "sphinxcontrib-htmlhelp" version))
224 "08l4x8a2l4xjqdd5rhvmfsqihmlgg4prdayj9b6pigaii6gzjw26"))))
225 (build-system python-build-system)
227 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
228 (home-page "https://github.com/sphinx-doc/sphinxcontrib-htmlhelp")
229 (synopsis "Sphinx extension for rendering HTML help files")
231 "@code{sphinxcontrib-htmlhelp} is a Sphinx extension which renders
233 (license license:bsd-2)))
235 (define-public python-sphinxcontrib-jsmath
237 (name "python-sphinxcontrib-jsmath")
241 (uri (pypi-uri "sphinxcontrib-jsmath" version))
244 "1f64w19j33sp151jimibraw6qrbhd5gxy8hs3797w9478m55x4m9"))))
245 (build-system python-build-system)
247 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
248 (home-page "https://github.com/sphinx-doc/sphinxcontrib-jsmath")
249 (synopsis "Sphinx extension to render math equations")
251 "@code{sphinxcontrib-jsmath} is a Sphinx extension which renders display
252 math in HTML via JavaScript.")
253 (license license:bsd-2)))
255 (define-public python-sphinxcontrib-newsfeed
257 (name "python-sphinxcontrib-newsfeed")
261 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
264 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
265 (arguments '(#:tests? #f)) ; No tests.
266 (build-system python-build-system)
268 `(("python-sphinx" ,python-sphinx)))
269 (synopsis "News Feed extension for Sphinx")
270 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
271 Blog, News or Announcements section to a Sphinx website.")
272 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
273 (license license:bsd-2)))
275 (define-public python-sphinxcontrib-programoutput
277 (name "python-sphinxcontrib-programoutput")
281 (uri (pypi-uri "sphinxcontrib-programoutput" version))
284 "155bz0z2cz544pphkd3nk7ph83mz7nn0ql135kzi62kqmd75ppc0"))))
285 (build-system python-build-system)
287 ;; FIXME: Many tests are failing.
290 `(("python-sphinx" ,python-sphinx)))
291 (synopsis "Sphinx extension to include program output")
292 (description "A Sphinx extension to literally insert the output of arbitrary
293 commands into documents, helping you to keep your command examples up to date.")
294 (home-page "https://github.com/NextThought/sphinxcontrib-programoutput")
295 (license license:bsd-2)))
297 (define-public python2-sphinxcontrib-programoutput
298 (package-with-python2 python-sphinxcontrib-programoutput))
300 (define-public python-sphinxcontrib-qthelp
302 (name "python-sphinxcontrib-qthelp")
306 (uri (pypi-uri "sphinxcontrib-qthelp" version))
309 "0vs09m6kf5vhiivpi5s5pks59iq0lqlsbkdycpqlysg53bhmqikr"))))
310 (build-system python-build-system)
312 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
313 (home-page "https://github.com/sphinx-doc/sphinxcontrib-qthelp")
314 (synopsis "Sphinx extension to output QtHelp documents")
316 "@code{sphinxcontrib-qthelp} is a Sphinx extension which outputs QtHelp
318 (license license:bsd-2)))
320 (define-public python-sphinxcontrib-serializinghtml
322 (name "python-sphinxcontrib-serializinghtml")
326 (uri (pypi-uri "sphinxcontrib-serializinghtml" version))
329 "09sj3nwahwr4iymg86gczbh151cfczqhf2kclbblzh2jh0zv7vy0"))))
330 (build-system python-build-system)
332 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
333 (home-page "https://github.com/sphinx-doc/sphinxcontrib-serializinghtml")
334 (synopsis "Sphinx extension to serialize HTML files")
336 "@code{sphinxcontrib-serializinghtml} is a Sphinx extension which outputs
337 \"serialized\" HTML files.")
338 (license license:bsd-2)))
340 (define-public python-sphinxcontrib-svg2pdfconverter
342 (name "python-sphinxcontrib-svg2pdfconverter")
346 (uri (pypi-uri "sphinxcontrib-svg2pdfconverter" version))
349 "1hhaxmqc7wh8gnyw5jaqckliknvk0p21y12wk3bdmncgkaf9ar8f"))))
350 (build-system python-build-system)
352 `(("python-sphinx" ,python-sphinx)))
353 (home-page "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter")
354 (synopsis "Sphinx SVG to PDF converter extension")
355 (description "A Sphinx extension to convert SVG images to PDF in case the
356 builder does not support SVG images natively (e.g. LaTeX).")
357 (license license:bsd-2)))
359 (define-public python-sphinxcontrib-websupport
361 (name "python-sphinxcontrib-websupport")
365 (uri (pypi-uri "sphinxcontrib-websupport" version))
368 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
369 (build-system python-build-system)
371 ;; FIXME: Tests depend on Sphinx, which depends on this.
373 (home-page "https://sphinx-doc.org/")
374 (synopsis "Sphinx API for web applications")
375 (description "This package provides a Python API to easily integrate
376 Sphinx documentation into your web application. It provides tools to
377 integrate Sphinx documents in web templates and to handle searches.")
378 (license license:bsd-3)))
380 (define-public python2-sphinxcontrib-websupport
381 (package-with-python2 python-sphinxcontrib-websupport))
383 (define-public python-sphinx-gallery
385 (name "python-sphinx-gallery")
390 (url "https://github.com/sphinx-gallery/sphinx-gallery")
391 (commit (string-append "v" version))))
392 (file-name (git-file-name name version))
395 "14nbqh9krx2l2y2ylbln6l6w8iak3wac1lngvaf278y1cx7685kg"))))
396 (build-system python-build-system)
398 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
399 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
400 ;; <https://matplotlib.org/objects.inv>.
403 `(("python-pytest-runner" ,python-pytest-runner)))
404 (home-page "https://sphinx-gallery.github.io/")
405 (synopsis "Generate an examples gallery automatically")
407 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
408 from any set of Python scripts and puts it into an examples gallery.")
409 (license license:bsd-3)))
411 (define-public python2-sphinx-gallery
412 (package-with-python2 python-sphinx-gallery))
414 (define-public python-sphinx-me
416 (name "python-sphinx-me")
421 (uri (pypi-uri "sphinx-me" version))
424 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
425 (build-system python-build-system)
426 (home-page "https://github.com/stephenmcd/sphinx-me")
427 (synopsis "Create a Sphinx documentation shell")
429 "Create a Sphinx documentation shell for your project and include the
430 README file as the documentation index. It handles extracting the required
431 meta data such as the project name, author and version from your project for
432 use in your Sphinx docs.")
433 (license license:bsd-2)))
435 (define-public python2-sphinx-me
436 (package-with-python2 python-sphinx-me))
438 (define-public python-sphinx-repoze-autointerface
440 (name "python-sphinx-repoze-autointerface")
444 (uri (pypi-uri "repoze.sphinx.autointerface" version))
447 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
448 (build-system python-build-system)
449 (arguments '(#:tests? #f)) ; No tests.
451 `(("python-sphinx" ,python-sphinx)
452 ("python-zope-interface" ,python-zope-interface)))
453 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
454 (description "This package defines an extension for the Sphinx documentation
455 system. The extension allows generation of API documentation by
456 introspection of @code{zope.interface} instances in code.")
457 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
458 (license license:repoze)))
460 (define-public python2-sphinx-repoze-autointerface
461 (package-with-python2 python-sphinx-repoze-autointerface))
463 (define-public python-sphinx-alabaster-theme
465 (name "python-sphinx-alabaster-theme")
469 (uri (pypi-uri "alabaster" version))
472 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
473 (build-system python-build-system)
475 `(("python-pygments" ,python-pygments)))
476 (home-page "https://alabaster.readthedocs.io/")
477 (synopsis "Configurable sidebar-enabled Sphinx theme")
478 (description "Alabaster is a visually (c)lean, responsive, configurable
479 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
480 (license license:bsd-3)))
482 (define-public python2-sphinx-alabaster-theme
483 (package-with-python2 python-sphinx-alabaster-theme))
485 (define-public python-sphinx-cloud-sptheme
487 (name "python-sphinx-cloud-sptheme")
491 (uri (pypi-uri "cloud_sptheme" version))
494 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
495 (build-system python-build-system)
496 ;; FIXME: The 'pypi' release archive does not contain tests.
497 (arguments '(#:tests? #f))
499 `(("python-sphinx" ,python-sphinx)))
500 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
501 (synopsis "'Cloud' theme for Sphinx documenter")
502 (description "This package contains the \"Cloud\" theme for Sphinx and some
503 related extensions.")
504 (license license:bsd-3)))
506 (define-public python2-sphinx-cloud-sptheme
507 (package-with-python2 python-sphinx-cloud-sptheme))
509 (define-public python-guzzle-sphinx-theme
511 (name "python-guzzle-sphinx-theme")
516 (uri (pypi-uri "guzzle_sphinx_theme" version))
519 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
520 (build-system python-build-system)
522 `(("python-sphinx" ,python-sphinx)))
523 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
524 (synopsis "Sphinx theme used by Guzzle")
525 (description "This package provides guzzle_sphinx_theme, a theme for the
526 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
527 and several other projects.")
528 (license license:expat)))
530 (define-public python2-guzzle-sphinx-theme
531 (package-with-python2 python-guzzle-sphinx-theme))
533 (define-public python-sphinx-rtd-theme
535 (name "python-sphinx-rtd-theme")
540 (uri (pypi-uri "sphinx_rtd_theme" version))
543 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
544 (build-system python-build-system)
545 (arguments '(#:tests? #f)) ; No tests.
547 `(("python-sphinx" ,python-sphinx)))
548 (home-page "https://github.com/snide/sphinx_rtd_theme/")
549 (synopsis "ReadTheDocs.org theme for Sphinx")
550 (description "A theme for Sphinx used by ReadTheDocs.org.")
551 (license license:expat)))
553 (define-public python2-sphinx-rtd-theme
554 (package-with-python2 python-sphinx-rtd-theme))
556 (define-public python-breathe
558 (name "python-breathe")
563 (uri (pypi-uri "breathe" version))
566 "1aw749n2ry27434qd7gr99dvsrs3x3chyi9aywmhjj1g4m2j6xf6"))))
567 (build-system python-build-system)
569 `(("python-docutils" ,python-docutils)
570 ("python-six" ,python-six)
571 ("python-sphinx" ,python-sphinx)))
572 (home-page "https://github.com/michaeljones/breathe")
573 (synopsis "ReStructuredText and Sphinx bridge to Doxygen")
574 (description "This package is an extension to reStructuredText and Sphinx
575 to be able to read and render the Doxygen xml output.")
576 (license license:bsd-3)))
578 (define-public python-sphinx-intl
580 (name "python-sphinx-intl")
585 (uri (pypi-uri "sphinx-intl" version))
588 "0zbf1bh23b3kza8bnjykmv2k21xmmr4gamhi3lnicnr6ypnrphr5"))))
589 (build-system python-build-system)
591 `(("python-sphinx" ,python-sphinx)
592 ("python-click" ,python-click)))
593 (home-page "https://github.com/sphinx-doc/sphinx-intl")
595 "Sphinx utility that makes it easy to translate and to apply translation")
597 "A utility tool that provides several features that make it easy to
598 translate and to apply translation to Sphinx generated document.")
599 (license license:bsd-2)))