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>
16 ;;; This file is part of GNU Guix.
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31 (define-module (gnu packages sphinx)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix git-download)
35 #:use-module (guix utils)
36 #:use-module (guix build-system python)
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages check)
40 #:use-module (gnu packages graphviz)
41 #:use-module (gnu packages image)
42 #:use-module (gnu packages imagemagick)
43 #:use-module (gnu packages python-web)
44 #:use-module (gnu packages python-xyz)
45 #:use-module (gnu packages time))
47 (define-public python-sphinx
49 (name "python-sphinx")
54 (uri (pypi-uri "Sphinx" version))
57 "0ig8s94xg0p6h9y5s3ns9x8i10b24ihzvs65b5jwrhrgih7nnn0d"))))
58 (build-system python-build-system)
61 (modify-phases %standard-phases
64 ;; Requires Internet access.
65 (delete-file "tests/test_build_linkcheck.py")
66 (substitute* "tests/test_build_latex.py"
67 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
68 "@pytest.mark.skip()"))
69 (invoke "make" "test"))))))
71 `(("python-imagesize" ,python-imagesize)
72 ("python-sphinx-alabaster-theme"
73 ,python-sphinx-alabaster-theme)
74 ("python-babel" ,python-babel)
75 ("python-snowballstemmer" ,python-snowballstemmer)
76 ("python-docutils" ,python-docutils)
77 ("python-jinja2" ,python-jinja2)
78 ("python-packaging" ,python-packaging)
79 ("python-pygments" ,python-pygments)
80 ("python-requests" ,python-requests)
81 ("python-sphinxcontrib-applehelp" ,python-sphinxcontrib-applehelp)
82 ("python-sphinxcontrib-devhelp" ,python-sphinxcontrib-devhelp)
83 ("python-sphinxcontrib-htmlhelp" ,python-sphinxcontrib-htmlhelp)
84 ("python-sphinxcontrib-jsmath" ,python-sphinxcontrib-jsmath)
85 ("python-sphinxcontrib-qthelp" ,python-sphinxcontrib-qthelp)
86 ("python-sphinxcontrib-serializinghtml"
87 ,python-sphinxcontrib-serializinghtml)))
89 `(("graphviz" ,graphviz)
90 ("imagemagick" ,imagemagick) ;for "convert"
91 ("python-html5lib" ,python-html5lib)
92 ("python-mock" ,python-mock)
93 ("python-nose" ,python-nose)
94 ("python-pytest" ,python-pytest)))
95 (home-page "https://sphinx-doc.org/")
96 (synopsis "Python documentation generator")
97 (description "Sphinx is a tool that makes it easy to create documentation
98 for Python projects or other documents consisting of multiple reStructuredText
100 (license license:bsd-3)
101 (properties `((python2-variant . ,(delay python2-sphinx))))))
103 ;; Sphinx 2 does not support Python 2, so we stick with this older version here.
104 ;; Remove this package once python2-pbcore no longer requires it.
105 (define-public python2-sphinx
106 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
112 (uri (pypi-uri "Sphinx" version))
115 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
117 (substitute-keyword-arguments (package-arguments base)
119 `(modify-phases ,phases
120 (add-before 'check 'disable-broken-tests
122 ;; These tests are broken when using Python2:
123 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
124 (for-each delete-file '("tests/test_api_translator.py"
125 "tests/test_setup_command.py"))
127 (native-inputs `(("python2-mock" ,python2-mock)
128 ("python2-enum34" ,python2-enum34)
129 ,@(package-native-inputs base)))
130 ;; Sphinx 2 has some dependencies that do not support Python 2, so
131 ;; we keep our own propagated-inputs here instead of inheriting.
132 (propagated-inputs `(("python2-pytz" ,python2-pytz)
133 ("python2-typing" ,python2-typing)
134 ("python2-imagesize" ,python2-imagesize)
135 ("python2-sphinx-alabaster-theme"
136 ,python2-sphinx-alabaster-theme)
137 ("python2-babel" ,python2-babel-2.6)
138 ("python2-snowballstemmer" ,python2-snowballstemmer)
139 ("python2-docutils" ,python2-docutils)
140 ("python2-jinja2" ,python2-jinja2)
141 ("python2-packaging" ,python2-packaging)
142 ("python2-pygments" ,python2-pygments)
143 ("python2-requests" ,python2-requests)
144 ("python2-six" ,python2-six)
145 ("python2-sphinxcontrib-websupport"
146 ,python2-sphinxcontrib-websupport))))))
148 (define-public python-sphinxcontrib-applehelp
150 (name "python-sphinxcontrib-applehelp")
154 (uri (pypi-uri "sphinxcontrib-applehelp" version))
157 "15rqmgphj4wqf4m5wnzxgmwxx5jwfzb0j0nb94ql0x5wnar0mapd"))))
158 (build-system python-build-system)
160 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
161 (home-page "https://github.com/sphinx-doc/sphinxcontrib-applehelp")
162 (synopsis "Sphinx extension for creating Apple help books")
164 "@code{sphinxcontrib-applehelp} is a Sphinx extension which outputs
166 (license license:bsd-2)))
168 (define-public python-sphinx-copybutton
170 (name "python-sphinx-copybutton")
175 (uri (pypi-uri "sphinx-copybutton" version))
178 "1bk006nv5s9ym6v67cxd4d2wvd8wm6czqi21mqcs33risygksncl"))))
179 (build-system python-build-system)
180 (home-page "https://github.com/choldgraf/sphinx-copybutton")
181 (synopsis "Sphinx extension to add \"copy\" buttons to code blocks")
183 "This package provides a small sphinx extension to add \"copy\" buttons
185 (license license:expat)))
187 (define-public python-sphinxcontrib-devhelp
189 (name "python-sphinxcontrib-devhelp")
193 (uri (pypi-uri "sphinxcontrib-devhelp" version))
196 "0d2a57kqxl72i55rns0ly1i044y2x234b9sdi89ajc3kjdvv0r3c"))))
197 (build-system python-build-system)
199 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
200 (home-page "https://github.com/sphinx-doc/sphinxcontrib-devhelp")
201 (synopsis "Sphinx extension for creating Devhelp documents")
203 "@code{sphinxcontrib-devhelp} is a Sphinx extension which outputs
204 @url{Devhelp,https://wiki.gnome.org/Apps/Devhelp} documents.")
205 (license license:bsd-2)))
207 (define-public python-sphinxcontrib-htmlhelp
209 (name "python-sphinxcontrib-htmlhelp")
213 (uri (pypi-uri "sphinxcontrib-htmlhelp" version))
216 "08l4x8a2l4xjqdd5rhvmfsqihmlgg4prdayj9b6pigaii6gzjw26"))))
217 (build-system python-build-system)
219 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
220 (home-page "https://github.com/sphinx-doc/sphinxcontrib-htmlhelp")
221 (synopsis "Sphinx extension for rendering HTML help files")
223 "@code{sphinxcontrib-htmlhelp} is a Sphinx extension which renders
225 (license license:bsd-2)))
227 (define-public python-sphinxcontrib-jsmath
229 (name "python-sphinxcontrib-jsmath")
233 (uri (pypi-uri "sphinxcontrib-jsmath" version))
236 "1f64w19j33sp151jimibraw6qrbhd5gxy8hs3797w9478m55x4m9"))))
237 (build-system python-build-system)
239 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
240 (home-page "https://github.com/sphinx-doc/sphinxcontrib-jsmath")
241 (synopsis "Sphinx extension to render math equations")
243 "@code{sphinxcontrib-jsmath} is a Sphinx extension which renders display
244 math in HTML via JavaScript.")
245 (license license:bsd-3)))
247 (define-public python-sphinxcontrib-newsfeed
249 (name "python-sphinxcontrib-newsfeed")
253 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
256 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
257 (arguments '(#:tests? #f)) ; No tests.
258 (build-system python-build-system)
260 `(("python-sphinx" ,python-sphinx)))
261 (synopsis "News Feed extension for Sphinx")
262 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
263 Blog, News or Announcements section to a Sphinx website.")
264 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
265 (license license:bsd-2)))
267 (define-public python-sphinxcontrib-programoutput
269 (name "python-sphinxcontrib-programoutput")
273 (uri (pypi-uri "sphinxcontrib-programoutput" version))
276 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
277 (build-system python-build-system)
279 ;; FIXME: Many tests are failing and the upstream is gone.
282 `(("python-sphinx" ,python-sphinx)))
283 (synopsis "Sphinx extension to include program output")
284 (description "A Sphinx extension to literally insert the output of arbitrary
285 commands into documents, helping you to keep your command examples up to date.")
286 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
287 (license license:bsd-2)))
289 (define-public python2-sphinxcontrib-programoutput
290 (package-with-python2 python-sphinxcontrib-programoutput))
292 (define-public python-sphinxcontrib-qthelp
294 (name "python-sphinxcontrib-qthelp")
298 (uri (pypi-uri "sphinxcontrib-qthelp" version))
301 "0vs09m6kf5vhiivpi5s5pks59iq0lqlsbkdycpqlysg53bhmqikr"))))
302 (build-system python-build-system)
304 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
305 (home-page "https://github.com/sphinx-doc/sphinxcontrib-qthelp")
306 (synopsis "Sphinx extension to output QtHelp documents")
308 "@code{sphinxcontrib-qthelp} is a Sphinx extension which outputs QtHelp
310 (license license:bsd-2)))
312 (define-public python-sphinxcontrib-serializinghtml
314 (name "python-sphinxcontrib-serializinghtml")
318 (uri (pypi-uri "sphinxcontrib-serializinghtml" version))
321 "09sj3nwahwr4iymg86gczbh151cfczqhf2kclbblzh2jh0zv7vy0"))))
322 (build-system python-build-system)
324 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
325 (home-page "https://github.com/sphinx-doc/sphinxcontrib-serializinghtml")
326 (synopsis "Sphinx extension to serialize HTML files")
328 "@code{sphinxcontrib-serializinghtml} is a Sphinx extension which outputs
329 \"serialized\" HTML files.")
330 (license license:bsd-2)))
332 (define-public python-sphinxcontrib-svg2pdfconverter
334 (name "python-sphinxcontrib-svg2pdfconverter")
338 (uri (pypi-uri "sphinxcontrib-svg2pdfconverter" version))
341 "1abvbgkkii13q8nsb10r0gc5lm0p9iq1iwhfhakn5ifn6asa0183"))))
342 (build-system python-build-system)
344 `(("python-sphinx" ,python-sphinx)))
345 (home-page "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter/releases")
346 (synopsis "Sphinx SVG to PDF converter extension")
347 (description "A Sphinx extension to convert SVG images to PDF in case the builder does not support
348 SVG images natively (e.g. LaTeX).")
349 (license license:bsd-3)))
351 (define-public python-sphinxcontrib-websupport
353 (name "python-sphinxcontrib-websupport")
357 (uri (pypi-uri "sphinxcontrib-websupport" version))
360 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
361 (build-system python-build-system)
363 ;; FIXME: Tests depend on Sphinx, which depends on this.
365 (home-page "https://sphinx-doc.org/")
366 (synopsis "Sphinx API for web applications")
367 (description "This package provides a Python API to easily integrate
368 Sphinx documentation into your web application. It provides tools to
369 integrate Sphinx documents in web templates and to handle searches.")
370 (license license:bsd-3)))
372 (define-public python2-sphinxcontrib-websupport
373 (package-with-python2 python-sphinxcontrib-websupport))
375 (define-public python-sphinx-gallery
377 (name "python-sphinx-gallery")
382 (url "https://github.com/sphinx-gallery/sphinx-gallery")
383 (commit (string-append "v" version))))
384 (file-name (git-file-name name version))
387 "14nbqh9krx2l2y2ylbln6l6w8iak3wac1lngvaf278y1cx7685kg"))))
388 (build-system python-build-system)
390 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
391 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
392 ;; <https://matplotlib.org/objects.inv>.
395 `(("python-pytest-runner" ,python-pytest-runner)))
396 (home-page "https://sphinx-gallery.github.io/")
397 (synopsis "Generate an examples gallery automatically")
399 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
400 from any set of Python scripts and puts it into an examples gallery.")
401 (license license:bsd-3)))
403 (define-public python2-sphinx-gallery
404 (package-with-python2 python-sphinx-gallery))
406 (define-public python-sphinx-me
408 (name "python-sphinx-me")
413 (uri (pypi-uri "sphinx-me" version))
416 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
417 (build-system python-build-system)
418 (home-page "https://github.com/stephenmcd/sphinx-me")
419 (synopsis "Create a Sphinx documentation shell")
421 "Create a Sphinx documentation shell for your project and include the
422 README file as the documentation index. It handles extracting the required
423 meta data such as the project name, author and version from your project for
424 use in your Sphinx docs.")
425 (license license:bsd-2)))
427 (define-public python2-sphinx-me
428 (package-with-python2 python-sphinx-me))
430 (define-public python-sphinx-repoze-autointerface
432 (name "python-sphinx-repoze-autointerface")
436 (uri (pypi-uri "repoze.sphinx.autointerface" version))
439 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
440 (build-system python-build-system)
441 (arguments '(#:tests? #f)) ; No tests.
443 `(("python-sphinx" ,python-sphinx)
444 ("python-zope-interface" ,python-zope-interface)))
445 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
446 (description "This package defines an extension for the Sphinx documentation
447 system. The extension allows generation of API documentation by
448 introspection of @code{zope.interface} instances in code.")
449 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
450 (license license:repoze)))
452 (define-public python2-sphinx-repoze-autointerface
453 (package-with-python2 python-sphinx-repoze-autointerface))
455 (define-public python-sphinx-alabaster-theme
457 (name "python-sphinx-alabaster-theme")
461 (uri (pypi-uri "alabaster" version))
464 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
465 (build-system python-build-system)
467 `(("python-pygments" ,python-pygments)))
468 (home-page "https://alabaster.readthedocs.io/")
469 (synopsis "Configurable sidebar-enabled Sphinx theme")
470 (description "Alabaster is a visually (c)lean, responsive, configurable
471 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
472 (license license:bsd-3)))
474 (define-public python2-sphinx-alabaster-theme
475 (package-with-python2 python-sphinx-alabaster-theme))
477 (define-public python-sphinx-cloud-sptheme
479 (name "python-sphinx-cloud-sptheme")
483 (uri (pypi-uri "cloud_sptheme" version))
486 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
487 (build-system python-build-system)
488 ;; FIXME: The 'pypi' release archive does not contain tests.
489 (arguments '(#:tests? #f))
491 `(("python-sphinx" ,python-sphinx)))
492 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
493 (synopsis "'Cloud' theme for Sphinx documenter")
494 (description "This package contains the \"Cloud\" theme for Sphinx and some
495 related extensions.")
496 (license license:bsd-3)))
498 (define-public python2-sphinx-cloud-sptheme
499 (package-with-python2 python-sphinx-cloud-sptheme))
501 (define-public python-guzzle-sphinx-theme
503 (name "python-guzzle-sphinx-theme")
508 (uri (pypi-uri "guzzle_sphinx_theme" version))
511 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
512 (build-system python-build-system)
514 `(("python-sphinx" ,python-sphinx)))
515 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
516 (synopsis "Sphinx theme used by Guzzle")
517 (description "This package provides guzzle_sphinx_theme, a theme for the
518 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
519 and several other projects.")
520 (license license:expat)))
522 (define-public python2-guzzle-sphinx-theme
523 (package-with-python2 python-guzzle-sphinx-theme))
525 (define-public python-sphinx-rtd-theme
527 (name "python-sphinx-rtd-theme")
532 (uri (pypi-uri "sphinx_rtd_theme" version))
535 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
536 (build-system python-build-system)
537 (arguments '(#:tests? #f)) ; No tests.
539 `(("python-sphinx" ,python-sphinx)))
540 (home-page "https://github.com/snide/sphinx_rtd_theme/")
541 (synopsis "ReadTheDocs.org theme for Sphinx")
542 (description "A theme for Sphinx used by ReadTheDocs.org.")
543 (license license:expat)))
545 (define-public python2-sphinx-rtd-theme
546 (package-with-python2 python-sphinx-rtd-theme))
548 (define-public python-breathe
550 (name "python-breathe")
555 (uri (pypi-uri "breathe" version))
558 "1aw749n2ry27434qd7gr99dvsrs3x3chyi9aywmhjj1g4m2j6xf6"))))
559 (build-system python-build-system)
561 `(("python-docutils" ,python-docutils)
562 ("python-six" ,python-six)
563 ("python-sphinx" ,python-sphinx)))
564 (home-page "https://github.com/michaeljones/breathe")
565 (synopsis "ReStructuredText and Sphinx bridge to Doxygen")
566 (description "This package is an extension to reStructuredText and Sphinx
567 to be able to read and render the Doxygen xml output.")
568 (license license:bsd-3)))
570 (define-public python-sphinx-intl
572 (name "python-sphinx-intl")
577 (uri (pypi-uri "sphinx-intl" version))
580 "0zbf1bh23b3kza8bnjykmv2k21xmmr4gamhi3lnicnr6ypnrphr5"))))
581 (build-system python-build-system)
583 `(("python-sphinx" ,python-sphinx)
584 ("python-click" ,python-click)))
585 (home-page "https://github.com/sphinx-doc/sphinx-intl")
587 "Sphinx utility that makes it easy to translate and to apply translation")
589 "A utility tool that provides several features that make it easy to
590 translate and to apply translation to Sphinx generated document.")
591 (license license:bsd-2)))