gnu: Add python-sphinxcontrib-serializinghtml.
[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
111(define-public python-sphinxcontrib-newsfeed
112 (package
113 (name "python-sphinxcontrib-newsfeed")
114 (version "0.1.4")
115 (source (origin
116 (method url-fetch)
117 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
118 (sha256
119 (base32
120 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
121 (arguments '(#:tests? #f)) ; No tests.
122 (build-system python-build-system)
123 (propagated-inputs
124 `(("python-sphinx" ,python-sphinx)))
125 (synopsis "News Feed extension for Sphinx")
126 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
127Blog, News or Announcements section to a Sphinx website.")
128 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
129 (license license:bsd-2)))
130
131(define-public python-sphinxcontrib-programoutput
132 (package
133 (name "python-sphinxcontrib-programoutput")
134 (version "0.10")
135 (source (origin
136 (method url-fetch)
137 (uri (pypi-uri "sphinxcontrib-programoutput" version))
138 (sha256
139 (base32
140 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
141 (build-system python-build-system)
142 (arguments
143 ;; FIXME: Many tests are failing and the upstream is gone.
144 '(#:tests? #f))
145 (propagated-inputs
146 `(("python-sphinx" ,python-sphinx)))
147 (synopsis "Sphinx extension to include program output")
148 (description "A Sphinx extension to literally insert the output of arbitrary
149commands into documents, helping you to keep your command examples up to date.")
150 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
151 (license license:bsd-2)))
152
153(define-public python2-sphinxcontrib-programoutput
154 (package-with-python2 python-sphinxcontrib-programoutput))
155
c5c55a9f
MB
156(define-public python-sphinxcontrib-serializinghtml
157 (package
158 (name "python-sphinxcontrib-serializinghtml")
159 (version "1.1.3")
160 (source (origin
161 (method url-fetch)
162 (uri (pypi-uri "sphinxcontrib-serializinghtml" version))
163 (sha256
164 (base32
165 "09sj3nwahwr4iymg86gczbh151cfczqhf2kclbblzh2jh0zv7vy0"))))
166 (build-system python-build-system)
167 (arguments
168 `(#:tests? #f)) ;XXX: circular dependency on Sphinx
169 (home-page "https://github.com/sphinx-doc/sphinxcontrib-serializinghtml")
170 (synopsis "Sphinx extension to serialize HTML files")
171 (description
172 "@code{sphinxcontrib-serializinghtml} is a Sphinx extension which outputs
173\"serialized\" HTML files.")
174 (license license:bsd-2)))
175
9d0c291e
MB
176(define-public python-sphinxcontrib-svg2pdfconverter
177 (package
178 (name "python-sphinxcontrib-svg2pdfconverter")
179 (version "0.1.0")
180 (source (origin
181 (method url-fetch)
182 (uri (pypi-uri "sphinxcontrib-svg2pdfconverter" version))
183 (sha256
184 (base32
185 "1abvbgkkii13q8nsb10r0gc5lm0p9iq1iwhfhakn5ifn6asa0183"))))
186 (build-system python-build-system)
187 (propagated-inputs
188 `(("python-sphinx" ,python-sphinx)))
189 (home-page "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter/releases")
190 (synopsis "Sphinx SVG to PDF converter extension")
191 (description "A Sphinx extension to convert SVG images to PDF in case the builder does not support
192SVG images natively (e.g. LaTeX).")
193 (license license:bsd-3)))
194
195(define-public python-sphinxcontrib-websupport
196 (package
197 (name "python-sphinxcontrib-websupport")
198 (version "1.1.0")
199 (source (origin
200 (method url-fetch)
201 (uri (pypi-uri "sphinxcontrib-websupport" version))
202 (sha256
203 (base32
204 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
205 (build-system python-build-system)
206 (arguments
207 ;; FIXME: Tests depend on Sphinx, which depends on this.
208 `(#:tests? #f))
209 (home-page "http://sphinx-doc.org/")
210 (synopsis "Sphinx API for web applications")
211 (description "This package provides a Python API to easily integrate
212Sphinx documentation into your web application. It provides tools to
213integrate Sphinx documents in web templates and to handle searches.")
214 (license license:bsd-3)))
215
216(define-public python2-sphinxcontrib-websupport
217 (package-with-python2 python-sphinxcontrib-websupport))
218
219(define-public python-sphinx-gallery
220 (package
221 (name "python-sphinx-gallery")
222 (version "0.1.13")
223 (source (origin
224 (method url-fetch)
225 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
226 "/archive/v" version ".tar.gz"))
227 (file-name (string-append name "-" version ".tar.gz"))
228 (sha256
229 (base32
230 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
231 (build-system python-build-system)
232 (arguments
233 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
234 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
235 ;; <https://matplotlib.org/objects.inv>.
236 `(#:tests? #f))
237 (native-inputs
238 `(("python-pytest-runner" ,python-pytest-runner)))
239 (home-page "https://sphinx-gallery.github.io/")
240 (synopsis "Generate an examples gallery automatically")
241 (description
242 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
243from any set of Python scripts and puts it into an examples gallery.")
244 (license license:bsd-3)))
245
246(define-public python2-sphinx-gallery
247 (package-with-python2 python-sphinx-gallery))
248
249(define-public python-sphinx-me
250 (package
251 (name "python-sphinx-me")
252 (version "0.3")
253 (source
254 (origin
255 (method url-fetch)
256 (uri (pypi-uri "sphinx-me" version))
257 (sha256
258 (base32
259 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
260 (build-system python-build-system)
261 (home-page "https://github.com/stephenmcd/sphinx-me")
262 (synopsis "Create a Sphinx documentation shell")
263 (description
264 "Create a Sphinx documentation shell for your project and include the
265README file as the documentation index. It handles extracting the required
266meta data such as the project name, author and version from your project for
267use in your Sphinx docs.")
268 (license license:bsd-2)))
269
270(define-public python2-sphinx-me
271 (package-with-python2 python-sphinx-me))
272
273(define-public python-sphinx-repoze-autointerface
274 (package
275 (name "python-sphinx-repoze-autointerface")
276 (version "0.8")
277 (source (origin
278 (method url-fetch)
279 (uri (pypi-uri "repoze.sphinx.autointerface" version))
280 (sha256
281 (base32
282 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
283 (build-system python-build-system)
284 (arguments '(#:tests? #f)) ; No tests.
285 (propagated-inputs
286 `(("python-sphinx" ,python-sphinx)
287 ("python-zope-interface" ,python-zope-interface)))
288 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
289 (description "This package defines an extension for the Sphinx documentation
290system. The extension allows generation of API documentation by
291introspection of @code{zope.interface} instances in code.")
292 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
293 (license license:repoze)))
294
295(define-public python2-sphinx-repoze-autointerface
296 (package-with-python2 python-sphinx-repoze-autointerface))
297
298(define-public python-sphinx-alabaster-theme
299 (package
300 (name "python-sphinx-alabaster-theme")
301 (version "0.7.12")
302 (source (origin
303 (method url-fetch)
304 (uri (pypi-uri "alabaster" version))
305 (sha256
306 (base32
307 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
308 (build-system python-build-system)
309 (propagated-inputs
310 `(("python-pygments" ,python-pygments)))
311 (home-page "https://alabaster.readthedocs.io/")
312 (synopsis "Configurable sidebar-enabled Sphinx theme")
313 (description "Alabaster is a visually (c)lean, responsive, configurable
314theme for the Sphinx documentation system. It's the default theme of Sphinx.")
315 (license license:bsd-3)))
316
317(define-public python2-sphinx-alabaster-theme
318 (package-with-python2 python-sphinx-alabaster-theme))
319
320(define-public python-sphinx-cloud-sptheme
321 (package
322 (name "python-sphinx-cloud-sptheme")
323 (version "1.8.0")
324 (source (origin
325 (method url-fetch)
326 (uri (pypi-uri "cloud_sptheme" version))
327 (sha256
328 (base32
329 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
330 (build-system python-build-system)
331 ;; FIXME: The 'pypi' release archive does not contain tests.
332 (arguments '(#:tests? #f))
333 (native-inputs
334 `(("python-sphinx" ,python-sphinx)))
335 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
336 (synopsis "'Cloud' theme for Sphinx documenter")
337 (description "This package contains the \"Cloud\" theme for Sphinx and some
338related extensions.")
339 (license license:bsd-3)))
340
341(define-public python2-sphinx-cloud-sptheme
342 (package-with-python2 python-sphinx-cloud-sptheme))
343
344(define-public python-guzzle-sphinx-theme
345 (package
346 (name "python-guzzle-sphinx-theme")
347 (version "0.7.11")
348 (source
349 (origin
350 (method url-fetch)
351 (uri (pypi-uri "guzzle_sphinx_theme" version))
352 (sha256
353 (base32
354 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
355 (build-system python-build-system)
356 (propagated-inputs
357 `(("python-sphinx" ,python-sphinx)))
358 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
359 (synopsis "Sphinx theme used by Guzzle")
360 (description "This package provides guzzle_sphinx_theme, a theme for the
361Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
362and several other projects.")
363 (license license:expat)))
364
365(define-public python2-guzzle-sphinx-theme
366 (package-with-python2 python-guzzle-sphinx-theme))
367
368(define-public python-sphinx-rtd-theme
369 (package
370 (name "python-sphinx-rtd-theme")
371 (version "0.2.4")
372 (source
373 (origin
374 (method url-fetch)
375 (uri (pypi-uri "sphinx_rtd_theme" version))
376 (sha256
377 (base32
378 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
379 (build-system python-build-system)
380 (arguments '(#:tests? #f)) ; No tests.
381 (propagated-inputs
382 `(("python-sphinx" ,python-sphinx)))
383 (home-page "https://github.com/snide/sphinx_rtd_theme/")
384 (synopsis "ReadTheDocs.org theme for Sphinx")
385 (description "A theme for Sphinx used by ReadTheDocs.org.")
386 (license license:expat)))
387
388(define-public python2-sphinx-rtd-theme
389 (package-with-python2 python-sphinx-rtd-theme))