gnu: Add python-sphinxcontrib-jsmath.
[jackhill/guix/guix.git] / gnu / packages / sphinx.scm
CommitLineData
9d0c291e
MB
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 David Thompson <davet@gnu.org>
3;;; Copyright © 2015, 2017 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;;;
15;;; This file is part of GNU Guix.
16;;;
17;;; GNU Guix is free software; you can redistribute it and/or modify it
18;;; under the terms of the GNU General Public License as published by
19;;; the Free Software Foundation; either version 3 of the License, or (at
20;;; your option) any later version.
21;;;
22;;; GNU Guix is distributed in the hope that it will be useful, but
23;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25;;; GNU General Public License for more details.
26;;;
27;;; You should have received a copy of the GNU General Public License
28;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30(define-module (gnu packages sphinx)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix build-system python)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages check)
37 #:use-module (gnu packages graphviz)
38 #:use-module (gnu packages image)
39 #:use-module (gnu packages imagemagick)
40 #:use-module (gnu packages python-web)
41 #:use-module (gnu packages python-xyz)
42 #:use-module (gnu packages time))
43
44(define-public python-sphinx
45 (package
46 (name "python-sphinx")
47 (version "1.7.7")
48 (source
49 (origin
50 (method url-fetch)
51 (uri (pypi-uri "Sphinx" version))
52 (sha256
53 (base32
54 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
55 (build-system python-build-system)
56 (arguments
57 `(#:phases
58 (modify-phases %standard-phases
59 (replace 'check
60 (lambda _
61 ;; Requires Internet access.
62 (delete-file "tests/test_build_linkcheck.py")
63 (substitute* "tests/test_build_latex.py"
64 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
65 "@pytest.mark.skip()"))
66 (when (which "python")
67 ;; XXX: These tests are broken when using Python2:
68 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
69 (delete-file "tests/test_api_translator.py")
70 (delete-file "tests/test_setup_command.py"))
71 (invoke "make" "test"))))))
72 (propagated-inputs
73 `(("python-imagesize" ,python-imagesize)
74 ("python-sphinx-alabaster-theme"
75 ,python-sphinx-alabaster-theme)
76 ("python-babel" ,python-babel)
77 ("python-snowballstemmer" ,python-snowballstemmer)
78 ("python-docutils" ,python-docutils)
79 ("python-jinja2" ,python-jinja2)
80 ("python-packaging" ,python-packaging)
81 ("python-pygments" ,python-pygments)
82 ("python-requests" ,python-requests)
83 ("python-six" ,python-six)
84 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
85 (native-inputs
86 `(("graphviz" ,graphviz)
87 ("imagemagick" ,imagemagick) ;for "convert"
88 ("python-html5lib" ,python-html5lib)
89 ("python-mock" ,python-mock)
90 ("python-nose" ,python-nose)
91 ("python-pytest" ,python-pytest)))
92 (home-page "http://sphinx-doc.org/")
93 (synopsis "Python documentation generator")
94 (description "Sphinx is a tool that makes it easy to create documentation
95for Python projects or other documents consisting of multiple reStructuredText
96sources.")
97 (license license:bsd-3)
98 (properties `((python2-variant . ,(delay python2-sphinx))))))
99
100(define-public python2-sphinx
101 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
102 (package
103 (inherit base)
104 (native-inputs `(("python2-mock" ,python2-mock)
105 ("python2-enum34" ,python2-enum34)
106 ,@(package-native-inputs base)))
107 (propagated-inputs `(("python2-pytz" ,python2-pytz)
108 ("python2-typing" ,python2-typing)
109 ,@(package-propagated-inputs base))))))
110
bc2a3f7c
MB
111(define-public python-sphinxcontrib-applehelp
112 (package
113 (name "python-sphinxcontrib-applehelp")
114 (version "1.0.1")
115 (source (origin
116 (method url-fetch)
117 (uri (pypi-uri "sphinxcontrib-applehelp" version))
118 (sha256
119 (base32
120 "15rqmgphj4wqf4m5wnzxgmwxx5jwfzb0j0nb94ql0x5wnar0mapd"))))
121 (build-system python-build-system)
122 (arguments
123 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
124 (home-page "https://github.com/sphinx-doc/sphinxcontrib-applehelp")
125 (synopsis "Sphinx extension for creating Apple help books")
126 (description
127 "@code{sphinxcontrib-applehelp} is a Sphinx extension which outputs
128Apple help books.")
129 (license license:bsd-2)))
130
62ad0c8b
MB
131(define-public python-sphinxcontrib-devhelp
132 (package
133 (name "python-sphinxcontrib-devhelp")
134 (version "1.0.1")
135 (source (origin
136 (method url-fetch)
137 (uri (pypi-uri "sphinxcontrib-devhelp" version))
138 (sha256
139 (base32
140 "0d2a57kqxl72i55rns0ly1i044y2x234b9sdi89ajc3kjdvv0r3c"))))
141 (build-system python-build-system)
142 (arguments
143 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
144 (home-page "https://github.com/sphinx-doc/sphinxcontrib-devhelp")
145 (synopsis "Sphinx extension for creating Devhelp documents")
146 (description
147 "@code{sphinxcontrib-devhelp} is a Sphinx extension which outputs
148@url{Devhelp,https://wiki.gnome.org/Apps/Devhelp} documents.")
149 (license license:bsd-2)))
150
67be8943
MB
151(define-public python-sphinxcontrib-jsmath
152 (package
153 (name "python-sphinxcontrib-jsmath")
154 (version "1.0.1")
155 (source (origin
156 (method url-fetch)
157 (uri (pypi-uri "sphinxcontrib-jsmath" version))
158 (sha256
159 (base32
160 "1f64w19j33sp151jimibraw6qrbhd5gxy8hs3797w9478m55x4m9"))))
161 (build-system python-build-system)
162 (arguments
163 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
164 (home-page "https://github.com/sphinx-doc/sphinxcontrib-jsmath")
165 (synopsis "Sphinx extension to render math equations")
166 (description
167 "@code{sphinxcontrib-jsmath} is a Sphinx extension which renders display
168math in HTML via JavaScript.")
169 (license license:bsd-3)))
170
9d0c291e
MB
171(define-public python-sphinxcontrib-newsfeed
172 (package
173 (name "python-sphinxcontrib-newsfeed")
174 (version "0.1.4")
175 (source (origin
176 (method url-fetch)
177 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
178 (sha256
179 (base32
180 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
181 (arguments '(#:tests? #f)) ; No tests.
182 (build-system python-build-system)
183 (propagated-inputs
184 `(("python-sphinx" ,python-sphinx)))
185 (synopsis "News Feed extension for Sphinx")
186 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
187Blog, News or Announcements section to a Sphinx website.")
188 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
189 (license license:bsd-2)))
190
191(define-public python-sphinxcontrib-programoutput
192 (package
193 (name "python-sphinxcontrib-programoutput")
194 (version "0.10")
195 (source (origin
196 (method url-fetch)
197 (uri (pypi-uri "sphinxcontrib-programoutput" version))
198 (sha256
199 (base32
200 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
201 (build-system python-build-system)
202 (arguments
203 ;; FIXME: Many tests are failing and the upstream is gone.
204 '(#:tests? #f))
205 (propagated-inputs
206 `(("python-sphinx" ,python-sphinx)))
207 (synopsis "Sphinx extension to include program output")
208 (description "A Sphinx extension to literally insert the output of arbitrary
209commands into documents, helping you to keep your command examples up to date.")
210 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
211 (license license:bsd-2)))
212
213(define-public python2-sphinxcontrib-programoutput
214 (package-with-python2 python-sphinxcontrib-programoutput))
215
c5c55a9f
MB
216(define-public python-sphinxcontrib-serializinghtml
217 (package
218 (name "python-sphinxcontrib-serializinghtml")
219 (version "1.1.3")
220 (source (origin
221 (method url-fetch)
222 (uri (pypi-uri "sphinxcontrib-serializinghtml" version))
223 (sha256
224 (base32
225 "09sj3nwahwr4iymg86gczbh151cfczqhf2kclbblzh2jh0zv7vy0"))))
226 (build-system python-build-system)
227 (arguments
228 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
229 (home-page "https://github.com/sphinx-doc/sphinxcontrib-serializinghtml")
230 (synopsis "Sphinx extension to serialize HTML files")
231 (description
232 "@code{sphinxcontrib-serializinghtml} is a Sphinx extension which outputs
233\"serialized\" HTML files.")
234 (license license:bsd-2)))
235
9d0c291e
MB
236(define-public python-sphinxcontrib-svg2pdfconverter
237 (package
238 (name "python-sphinxcontrib-svg2pdfconverter")
239 (version "0.1.0")
240 (source (origin
241 (method url-fetch)
242 (uri (pypi-uri "sphinxcontrib-svg2pdfconverter" version))
243 (sha256
244 (base32
245 "1abvbgkkii13q8nsb10r0gc5lm0p9iq1iwhfhakn5ifn6asa0183"))))
246 (build-system python-build-system)
247 (propagated-inputs
248 `(("python-sphinx" ,python-sphinx)))
249 (home-page "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter/releases")
250 (synopsis "Sphinx SVG to PDF converter extension")
251 (description "A Sphinx extension to convert SVG images to PDF in case the builder does not support
252SVG images natively (e.g. LaTeX).")
253 (license license:bsd-3)))
254
255(define-public python-sphinxcontrib-websupport
256 (package
257 (name "python-sphinxcontrib-websupport")
258 (version "1.1.0")
259 (source (origin
260 (method url-fetch)
261 (uri (pypi-uri "sphinxcontrib-websupport" version))
262 (sha256
263 (base32
264 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
265 (build-system python-build-system)
266 (arguments
267 ;; FIXME: Tests depend on Sphinx, which depends on this.
268 `(#:tests? #f))
269 (home-page "http://sphinx-doc.org/")
270 (synopsis "Sphinx API for web applications")
271 (description "This package provides a Python API to easily integrate
272Sphinx documentation into your web application. It provides tools to
273integrate Sphinx documents in web templates and to handle searches.")
274 (license license:bsd-3)))
275
276(define-public python2-sphinxcontrib-websupport
277 (package-with-python2 python-sphinxcontrib-websupport))
278
279(define-public python-sphinx-gallery
280 (package
281 (name "python-sphinx-gallery")
282 (version "0.1.13")
283 (source (origin
284 (method url-fetch)
285 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
286 "/archive/v" version ".tar.gz"))
287 (file-name (string-append name "-" version ".tar.gz"))
288 (sha256
289 (base32
290 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
291 (build-system python-build-system)
292 (arguments
293 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
294 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
295 ;; <https://matplotlib.org/objects.inv>.
296 `(#:tests? #f))
297 (native-inputs
298 `(("python-pytest-runner" ,python-pytest-runner)))
299 (home-page "https://sphinx-gallery.github.io/")
300 (synopsis "Generate an examples gallery automatically")
301 (description
302 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
303from any set of Python scripts and puts it into an examples gallery.")
304 (license license:bsd-3)))
305
306(define-public python2-sphinx-gallery
307 (package-with-python2 python-sphinx-gallery))
308
309(define-public python-sphinx-me
310 (package
311 (name "python-sphinx-me")
312 (version "0.3")
313 (source
314 (origin
315 (method url-fetch)
316 (uri (pypi-uri "sphinx-me" version))
317 (sha256
318 (base32
319 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
320 (build-system python-build-system)
321 (home-page "https://github.com/stephenmcd/sphinx-me")
322 (synopsis "Create a Sphinx documentation shell")
323 (description
324 "Create a Sphinx documentation shell for your project and include the
325README file as the documentation index. It handles extracting the required
326meta data such as the project name, author and version from your project for
327use in your Sphinx docs.")
328 (license license:bsd-2)))
329
330(define-public python2-sphinx-me
331 (package-with-python2 python-sphinx-me))
332
333(define-public python-sphinx-repoze-autointerface
334 (package
335 (name "python-sphinx-repoze-autointerface")
336 (version "0.8")
337 (source (origin
338 (method url-fetch)
339 (uri (pypi-uri "repoze.sphinx.autointerface" version))
340 (sha256
341 (base32
342 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
343 (build-system python-build-system)
344 (arguments '(#:tests? #f)) ; No tests.
345 (propagated-inputs
346 `(("python-sphinx" ,python-sphinx)
347 ("python-zope-interface" ,python-zope-interface)))
348 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
349 (description "This package defines an extension for the Sphinx documentation
350system. The extension allows generation of API documentation by
351introspection of @code{zope.interface} instances in code.")
352 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
353 (license license:repoze)))
354
355(define-public python2-sphinx-repoze-autointerface
356 (package-with-python2 python-sphinx-repoze-autointerface))
357
358(define-public python-sphinx-alabaster-theme
359 (package
360 (name "python-sphinx-alabaster-theme")
361 (version "0.7.12")
362 (source (origin
363 (method url-fetch)
364 (uri (pypi-uri "alabaster" version))
365 (sha256
366 (base32
367 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
368 (build-system python-build-system)
369 (propagated-inputs
370 `(("python-pygments" ,python-pygments)))
371 (home-page "https://alabaster.readthedocs.io/")
372 (synopsis "Configurable sidebar-enabled Sphinx theme")
373 (description "Alabaster is a visually (c)lean, responsive, configurable
374theme for the Sphinx documentation system. It's the default theme of Sphinx.")
375 (license license:bsd-3)))
376
377(define-public python2-sphinx-alabaster-theme
378 (package-with-python2 python-sphinx-alabaster-theme))
379
380(define-public python-sphinx-cloud-sptheme
381 (package
382 (name "python-sphinx-cloud-sptheme")
383 (version "1.8.0")
384 (source (origin
385 (method url-fetch)
386 (uri (pypi-uri "cloud_sptheme" version))
387 (sha256
388 (base32
389 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
390 (build-system python-build-system)
391 ;; FIXME: The 'pypi' release archive does not contain tests.
392 (arguments '(#:tests? #f))
393 (native-inputs
394 `(("python-sphinx" ,python-sphinx)))
395 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
396 (synopsis "'Cloud' theme for Sphinx documenter")
397 (description "This package contains the \"Cloud\" theme for Sphinx and some
398related extensions.")
399 (license license:bsd-3)))
400
401(define-public python2-sphinx-cloud-sptheme
402 (package-with-python2 python-sphinx-cloud-sptheme))
403
404(define-public python-guzzle-sphinx-theme
405 (package
406 (name "python-guzzle-sphinx-theme")
407 (version "0.7.11")
408 (source
409 (origin
410 (method url-fetch)
411 (uri (pypi-uri "guzzle_sphinx_theme" version))
412 (sha256
413 (base32
414 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
415 (build-system python-build-system)
416 (propagated-inputs
417 `(("python-sphinx" ,python-sphinx)))
418 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
419 (synopsis "Sphinx theme used by Guzzle")
420 (description "This package provides guzzle_sphinx_theme, a theme for the
421Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
422and several other projects.")
423 (license license:expat)))
424
425(define-public python2-guzzle-sphinx-theme
426 (package-with-python2 python-guzzle-sphinx-theme))
427
428(define-public python-sphinx-rtd-theme
429 (package
430 (name "python-sphinx-rtd-theme")
431 (version "0.2.4")
432 (source
433 (origin
434 (method url-fetch)
435 (uri (pypi-uri "sphinx_rtd_theme" version))
436 (sha256
437 (base32
438 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
439 (build-system python-build-system)
440 (arguments '(#:tests? #f)) ; No tests.
441 (propagated-inputs
442 `(("python-sphinx" ,python-sphinx)))
443 (home-page "https://github.com/snide/sphinx_rtd_theme/")
444 (synopsis "ReadTheDocs.org theme for Sphinx")
445 (description "A theme for Sphinx used by ReadTheDocs.org.")
446 (license license:expat)))
447
448(define-public python2-sphinx-rtd-theme
449 (package-with-python2 python-sphinx-rtd-theme))