Commit | Line | Data |
---|---|---|
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 | |
95 | for Python projects or other documents consisting of multiple reStructuredText | |
96 | sources.") | |
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 | |
128 | Apple 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 | ||
72f278a0 MB |
151 | (define-public python-sphinxcontrib-htmlhelp |
152 | (package | |
153 | (name "python-sphinxcontrib-htmlhelp") | |
154 | (version "1.0.2") | |
155 | (source (origin | |
156 | (method url-fetch) | |
157 | (uri (pypi-uri "sphinxcontrib-htmlhelp" version)) | |
158 | (sha256 | |
159 | (base32 | |
160 | "08l4x8a2l4xjqdd5rhvmfsqihmlgg4prdayj9b6pigaii6gzjw26")))) | |
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-htmlhelp") | |
165 | (synopsis "Sphinx exension for rendering HTML help files") | |
166 | (description | |
167 | "@code{sphinxcontrib-htmlhelp} is a Sphinx extension which renders | |
168 | HTML help files.") | |
169 | (license license:bsd-2))) | |
170 | ||
67be8943 MB |
171 | (define-public python-sphinxcontrib-jsmath |
172 | (package | |
173 | (name "python-sphinxcontrib-jsmath") | |
174 | (version "1.0.1") | |
175 | (source (origin | |
176 | (method url-fetch) | |
177 | (uri (pypi-uri "sphinxcontrib-jsmath" version)) | |
178 | (sha256 | |
179 | (base32 | |
180 | "1f64w19j33sp151jimibraw6qrbhd5gxy8hs3797w9478m55x4m9")))) | |
181 | (build-system python-build-system) | |
182 | (arguments | |
183 | `(#:tests? #f)) ;XXX: circular dependency on Sphinx | |
184 | (home-page "https://github.com/sphinx-doc/sphinxcontrib-jsmath") | |
185 | (synopsis "Sphinx extension to render math equations") | |
186 | (description | |
187 | "@code{sphinxcontrib-jsmath} is a Sphinx extension which renders display | |
188 | math in HTML via JavaScript.") | |
189 | (license license:bsd-3))) | |
190 | ||
9d0c291e MB |
191 | (define-public python-sphinxcontrib-newsfeed |
192 | (package | |
193 | (name "python-sphinxcontrib-newsfeed") | |
194 | (version "0.1.4") | |
195 | (source (origin | |
196 | (method url-fetch) | |
197 | (uri (pypi-uri "sphinxcontrib-newsfeed" version)) | |
198 | (sha256 | |
199 | (base32 | |
200 | "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p")))) | |
201 | (arguments '(#:tests? #f)) ; No tests. | |
202 | (build-system python-build-system) | |
203 | (propagated-inputs | |
204 | `(("python-sphinx" ,python-sphinx))) | |
205 | (synopsis "News Feed extension for Sphinx") | |
206 | (description "Sphinxcontrib-newsfeed is an extension for adding a simple | |
207 | Blog, News or Announcements section to a Sphinx website.") | |
208 | (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed") | |
209 | (license license:bsd-2))) | |
210 | ||
211 | (define-public python-sphinxcontrib-programoutput | |
212 | (package | |
213 | (name "python-sphinxcontrib-programoutput") | |
214 | (version "0.10") | |
215 | (source (origin | |
216 | (method url-fetch) | |
217 | (uri (pypi-uri "sphinxcontrib-programoutput" version)) | |
218 | (sha256 | |
219 | (base32 | |
220 | "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx")))) | |
221 | (build-system python-build-system) | |
222 | (arguments | |
223 | ;; FIXME: Many tests are failing and the upstream is gone. | |
224 | '(#:tests? #f)) | |
225 | (propagated-inputs | |
226 | `(("python-sphinx" ,python-sphinx))) | |
227 | (synopsis "Sphinx extension to include program output") | |
228 | (description "A Sphinx extension to literally insert the output of arbitrary | |
229 | commands into documents, helping you to keep your command examples up to date.") | |
230 | (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput") | |
231 | (license license:bsd-2))) | |
232 | ||
233 | (define-public python2-sphinxcontrib-programoutput | |
234 | (package-with-python2 python-sphinxcontrib-programoutput)) | |
235 | ||
c5c55a9f MB |
236 | (define-public python-sphinxcontrib-serializinghtml |
237 | (package | |
238 | (name "python-sphinxcontrib-serializinghtml") | |
239 | (version "1.1.3") | |
240 | (source (origin | |
241 | (method url-fetch) | |
242 | (uri (pypi-uri "sphinxcontrib-serializinghtml" version)) | |
243 | (sha256 | |
244 | (base32 | |
245 | "09sj3nwahwr4iymg86gczbh151cfczqhf2kclbblzh2jh0zv7vy0")))) | |
246 | (build-system python-build-system) | |
247 | (arguments | |
248 | `(#:tests? #f)) ;XXX: circular dependency on Sphinx | |
249 | (home-page "https://github.com/sphinx-doc/sphinxcontrib-serializinghtml") | |
250 | (synopsis "Sphinx extension to serialize HTML files") | |
251 | (description | |
252 | "@code{sphinxcontrib-serializinghtml} is a Sphinx extension which outputs | |
253 | \"serialized\" HTML files.") | |
254 | (license license:bsd-2))) | |
255 | ||
9d0c291e MB |
256 | (define-public python-sphinxcontrib-svg2pdfconverter |
257 | (package | |
258 | (name "python-sphinxcontrib-svg2pdfconverter") | |
259 | (version "0.1.0") | |
260 | (source (origin | |
261 | (method url-fetch) | |
262 | (uri (pypi-uri "sphinxcontrib-svg2pdfconverter" version)) | |
263 | (sha256 | |
264 | (base32 | |
265 | "1abvbgkkii13q8nsb10r0gc5lm0p9iq1iwhfhakn5ifn6asa0183")))) | |
266 | (build-system python-build-system) | |
267 | (propagated-inputs | |
268 | `(("python-sphinx" ,python-sphinx))) | |
269 | (home-page "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter/releases") | |
270 | (synopsis "Sphinx SVG to PDF converter extension") | |
271 | (description "A Sphinx extension to convert SVG images to PDF in case the builder does not support | |
272 | SVG images natively (e.g. LaTeX).") | |
273 | (license license:bsd-3))) | |
274 | ||
275 | (define-public python-sphinxcontrib-websupport | |
276 | (package | |
277 | (name "python-sphinxcontrib-websupport") | |
278 | (version "1.1.0") | |
279 | (source (origin | |
280 | (method url-fetch) | |
281 | (uri (pypi-uri "sphinxcontrib-websupport" version)) | |
282 | (sha256 | |
283 | (base32 | |
284 | "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x")))) | |
285 | (build-system python-build-system) | |
286 | (arguments | |
287 | ;; FIXME: Tests depend on Sphinx, which depends on this. | |
288 | `(#:tests? #f)) | |
289 | (home-page "http://sphinx-doc.org/") | |
290 | (synopsis "Sphinx API for web applications") | |
291 | (description "This package provides a Python API to easily integrate | |
292 | Sphinx documentation into your web application. It provides tools to | |
293 | integrate Sphinx documents in web templates and to handle searches.") | |
294 | (license license:bsd-3))) | |
295 | ||
296 | (define-public python2-sphinxcontrib-websupport | |
297 | (package-with-python2 python-sphinxcontrib-websupport)) | |
298 | ||
299 | (define-public python-sphinx-gallery | |
300 | (package | |
301 | (name "python-sphinx-gallery") | |
302 | (version "0.1.13") | |
303 | (source (origin | |
304 | (method url-fetch) | |
305 | (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery" | |
306 | "/archive/v" version ".tar.gz")) | |
307 | (file-name (string-append name "-" version ".tar.gz")) | |
308 | (sha256 | |
309 | (base32 | |
310 | "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd")))) | |
311 | (build-system python-build-system) | |
312 | (arguments | |
313 | ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>, | |
314 | ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and | |
315 | ;; <https://matplotlib.org/objects.inv>. | |
316 | `(#:tests? #f)) | |
317 | (native-inputs | |
318 | `(("python-pytest-runner" ,python-pytest-runner))) | |
319 | (home-page "https://sphinx-gallery.github.io/") | |
320 | (synopsis "Generate an examples gallery automatically") | |
321 | (description | |
322 | "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version | |
323 | from any set of Python scripts and puts it into an examples gallery.") | |
324 | (license license:bsd-3))) | |
325 | ||
326 | (define-public python2-sphinx-gallery | |
327 | (package-with-python2 python-sphinx-gallery)) | |
328 | ||
329 | (define-public python-sphinx-me | |
330 | (package | |
331 | (name "python-sphinx-me") | |
332 | (version "0.3") | |
333 | (source | |
334 | (origin | |
335 | (method url-fetch) | |
336 | (uri (pypi-uri "sphinx-me" version)) | |
337 | (sha256 | |
338 | (base32 | |
339 | "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq")))) | |
340 | (build-system python-build-system) | |
341 | (home-page "https://github.com/stephenmcd/sphinx-me") | |
342 | (synopsis "Create a Sphinx documentation shell") | |
343 | (description | |
344 | "Create a Sphinx documentation shell for your project and include the | |
345 | README file as the documentation index. It handles extracting the required | |
346 | meta data such as the project name, author and version from your project for | |
347 | use in your Sphinx docs.") | |
348 | (license license:bsd-2))) | |
349 | ||
350 | (define-public python2-sphinx-me | |
351 | (package-with-python2 python-sphinx-me)) | |
352 | ||
353 | (define-public python-sphinx-repoze-autointerface | |
354 | (package | |
355 | (name "python-sphinx-repoze-autointerface") | |
356 | (version "0.8") | |
357 | (source (origin | |
358 | (method url-fetch) | |
359 | (uri (pypi-uri "repoze.sphinx.autointerface" version)) | |
360 | (sha256 | |
361 | (base32 | |
362 | "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f")))) | |
363 | (build-system python-build-system) | |
364 | (arguments '(#:tests? #f)) ; No tests. | |
365 | (propagated-inputs | |
366 | `(("python-sphinx" ,python-sphinx) | |
367 | ("python-zope-interface" ,python-zope-interface))) | |
368 | (synopsis "Auto-generate Sphinx API docs from Zope interfaces") | |
369 | (description "This package defines an extension for the Sphinx documentation | |
370 | system. The extension allows generation of API documentation by | |
371 | introspection of @code{zope.interface} instances in code.") | |
372 | (home-page "https://github.com/repoze/repoze.sphinx.autointerface") | |
373 | (license license:repoze))) | |
374 | ||
375 | (define-public python2-sphinx-repoze-autointerface | |
376 | (package-with-python2 python-sphinx-repoze-autointerface)) | |
377 | ||
378 | (define-public python-sphinx-alabaster-theme | |
379 | (package | |
380 | (name "python-sphinx-alabaster-theme") | |
381 | (version "0.7.12") | |
382 | (source (origin | |
383 | (method url-fetch) | |
384 | (uri (pypi-uri "alabaster" version)) | |
385 | (sha256 | |
386 | (base32 | |
387 | "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6")))) | |
388 | (build-system python-build-system) | |
389 | (propagated-inputs | |
390 | `(("python-pygments" ,python-pygments))) | |
391 | (home-page "https://alabaster.readthedocs.io/") | |
392 | (synopsis "Configurable sidebar-enabled Sphinx theme") | |
393 | (description "Alabaster is a visually (c)lean, responsive, configurable | |
394 | theme for the Sphinx documentation system. It's the default theme of Sphinx.") | |
395 | (license license:bsd-3))) | |
396 | ||
397 | (define-public python2-sphinx-alabaster-theme | |
398 | (package-with-python2 python-sphinx-alabaster-theme)) | |
399 | ||
400 | (define-public python-sphinx-cloud-sptheme | |
401 | (package | |
402 | (name "python-sphinx-cloud-sptheme") | |
403 | (version "1.8.0") | |
404 | (source (origin | |
405 | (method url-fetch) | |
406 | (uri (pypi-uri "cloud_sptheme" version)) | |
407 | (sha256 | |
408 | (base32 | |
409 | "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd")))) | |
410 | (build-system python-build-system) | |
411 | ;; FIXME: The 'pypi' release archive does not contain tests. | |
412 | (arguments '(#:tests? #f)) | |
413 | (native-inputs | |
414 | `(("python-sphinx" ,python-sphinx))) | |
415 | (home-page "https://bitbucket.org/ecollins/cloud_sptheme") | |
416 | (synopsis "'Cloud' theme for Sphinx documenter") | |
417 | (description "This package contains the \"Cloud\" theme for Sphinx and some | |
418 | related extensions.") | |
419 | (license license:bsd-3))) | |
420 | ||
421 | (define-public python2-sphinx-cloud-sptheme | |
422 | (package-with-python2 python-sphinx-cloud-sptheme)) | |
423 | ||
424 | (define-public python-guzzle-sphinx-theme | |
425 | (package | |
426 | (name "python-guzzle-sphinx-theme") | |
427 | (version "0.7.11") | |
428 | (source | |
429 | (origin | |
430 | (method url-fetch) | |
431 | (uri (pypi-uri "guzzle_sphinx_theme" version)) | |
432 | (sha256 | |
433 | (base32 | |
434 | "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v")))) | |
435 | (build-system python-build-system) | |
436 | (propagated-inputs | |
437 | `(("python-sphinx" ,python-sphinx))) | |
438 | (home-page "https://github.com/guzzle/guzzle_sphinx_theme") | |
439 | (synopsis "Sphinx theme used by Guzzle") | |
440 | (description "This package provides guzzle_sphinx_theme, a theme for the | |
441 | Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle} | |
442 | and several other projects.") | |
443 | (license license:expat))) | |
444 | ||
445 | (define-public python2-guzzle-sphinx-theme | |
446 | (package-with-python2 python-guzzle-sphinx-theme)) | |
447 | ||
448 | (define-public python-sphinx-rtd-theme | |
449 | (package | |
450 | (name "python-sphinx-rtd-theme") | |
451 | (version "0.2.4") | |
452 | (source | |
453 | (origin | |
454 | (method url-fetch) | |
455 | (uri (pypi-uri "sphinx_rtd_theme" version)) | |
456 | (sha256 | |
457 | (base32 | |
458 | "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd")))) | |
459 | (build-system python-build-system) | |
460 | (arguments '(#:tests? #f)) ; No tests. | |
461 | (propagated-inputs | |
462 | `(("python-sphinx" ,python-sphinx))) | |
463 | (home-page "https://github.com/snide/sphinx_rtd_theme/") | |
464 | (synopsis "ReadTheDocs.org theme for Sphinx") | |
465 | (description "A theme for Sphinx used by ReadTheDocs.org.") | |
466 | (license license:expat))) | |
467 | ||
468 | (define-public python2-sphinx-rtd-theme | |
469 | (package-with-python2 python-sphinx-rtd-theme)) |