| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2014 David Thompson <davet@gnu.org> |
| 3 | ;;; Copyright © 2015, 2017, 2019, 2020, 2021 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, 2020 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, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
| 14 | ;;; Copyright © 2019 Alexandros Theodotou <alex@zrythm.org> |
| 15 | ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org> |
| 16 | ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org> |
| 17 | ;;; Copyright © 2021 Eric Bavier <bavier@posteo.net> |
| 18 | ;;; Copyright © 2021 Vinicius Monego <monego@posteo.net> |
| 19 | ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr> |
| 20 | ;;; |
| 21 | ;;; This file is part of GNU Guix. |
| 22 | ;;; |
| 23 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 24 | ;;; under the terms of the GNU General Public License as published by |
| 25 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 26 | ;;; your option) any later version. |
| 27 | ;;; |
| 28 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 29 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 30 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 31 | ;;; GNU General Public License for more details. |
| 32 | ;;; |
| 33 | ;;; You should have received a copy of the GNU General Public License |
| 34 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 35 | |
| 36 | (define-module (gnu packages sphinx) |
| 37 | #:use-module (guix packages) |
| 38 | #:use-module (guix download) |
| 39 | #:use-module (guix git-download) |
| 40 | #:use-module (guix utils) |
| 41 | #:use-module (guix build-system python) |
| 42 | #:use-module ((guix licenses) #:prefix license:) |
| 43 | #:use-module (gnu packages) |
| 44 | #:use-module (gnu packages check) |
| 45 | #:use-module (gnu packages graphviz) |
| 46 | #:use-module (gnu packages image) |
| 47 | #:use-module (gnu packages imagemagick) |
| 48 | #:use-module (gnu packages python-build) |
| 49 | #:use-module (gnu packages python-crypto) |
| 50 | #:use-module (gnu packages python-web) |
| 51 | #:use-module (gnu packages python-xyz) |
| 52 | #:use-module (gnu packages time)) |
| 53 | |
| 54 | (define-public python-sphinx |
| 55 | (package |
| 56 | (name "python-sphinx") |
| 57 | (version "3.3.1") |
| 58 | (source |
| 59 | (origin |
| 60 | (method url-fetch) |
| 61 | (uri (pypi-uri "Sphinx" version)) |
| 62 | (sha256 |
| 63 | (base32 |
| 64 | "0023vc2i29pjxmvdqbz1wdbi7gbj56y1br1b2z8h8wa44li5k38y")))) |
| 65 | (build-system python-build-system) |
| 66 | (arguments |
| 67 | `(#:phases |
| 68 | (modify-phases %standard-phases |
| 69 | (replace 'check |
| 70 | (lambda _ |
| 71 | ;; Requires Internet access. |
| 72 | (delete-file "tests/test_build_linkcheck.py") |
| 73 | (substitute* "tests/test_build_latex.py" |
| 74 | (("@pytest.mark.sphinx\\('latex', testroot='images'\\)") |
| 75 | "@pytest.mark.skip()")) |
| 76 | (invoke "make" "test")))))) |
| 77 | (propagated-inputs |
| 78 | `(("python-babel" ,python-babel) |
| 79 | ("python-docutils" ,python-docutils) |
| 80 | ("python-jinja2" ,python-jinja2) |
| 81 | ("python-imagesize" ,python-imagesize) |
| 82 | ("python-packaging" ,python-packaging) |
| 83 | ("python-pygments" ,python-pygments) |
| 84 | ("python-requests" ,python-requests) |
| 85 | ("python-snowballstemmer" ,python-snowballstemmer) |
| 86 | ("python-sphinx-alabaster-theme" |
| 87 | ,python-sphinx-alabaster-theme) |
| 88 | ("python-sphinxcontrib-applehelp" ,python-sphinxcontrib-applehelp) |
| 89 | ("python-sphinxcontrib-devhelp" ,python-sphinxcontrib-devhelp) |
| 90 | ("python-sphinxcontrib-htmlhelp" ,python-sphinxcontrib-htmlhelp) |
| 91 | ("python-sphinxcontrib-jsmath" ,python-sphinxcontrib-jsmath) |
| 92 | ("python-sphinxcontrib-qthelp" ,python-sphinxcontrib-qthelp) |
| 93 | ("python-sphinxcontrib-serializinghtml" |
| 94 | ,python-sphinxcontrib-serializinghtml))) |
| 95 | (native-inputs |
| 96 | `(("graphviz" ,graphviz) |
| 97 | ("imagemagick" ,imagemagick) ;for "convert" |
| 98 | ("python-html5lib" ,python-html5lib) |
| 99 | ("python-mock" ,python-mock) |
| 100 | ("python-nose" ,python-nose) |
| 101 | ("python-pytest" ,python-pytest))) |
| 102 | (home-page "https://www.sphinx-doc.org") |
| 103 | (synopsis "Python documentation generator") |
| 104 | (description "Sphinx is a tool that makes it easy to create documentation |
| 105 | for Python projects or other documents consisting of multiple reStructuredText |
| 106 | sources.") |
| 107 | (license license:bsd-2) |
| 108 | (properties `((python2-variant . ,(delay python2-sphinx)))))) |
| 109 | |
| 110 | ;; Sphinx 2 does not support Python 2, so we stick with this older version here. |
| 111 | (define-public python2-sphinx |
| 112 | (let ((base (package-with-python2 (strip-python2-variant python-sphinx)))) |
| 113 | (package |
| 114 | (inherit base) |
| 115 | (version "1.7.7") |
| 116 | (source (origin |
| 117 | (method url-fetch) |
| 118 | (uri (pypi-uri "Sphinx" version)) |
| 119 | (sha256 |
| 120 | (base32 |
| 121 | "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi")))) |
| 122 | (arguments |
| 123 | (substitute-keyword-arguments (package-arguments base) |
| 124 | ((#:phases phases) |
| 125 | `(modify-phases ,phases |
| 126 | (add-before 'check 'disable-broken-tests |
| 127 | (lambda _ |
| 128 | (for-each delete-file |
| 129 | ;; These tests are broken when using Python2: |
| 130 | ;; <https://github.com/sphinx-doc/sphinx/issues/4710>. |
| 131 | '("tests/test_api_translator.py" |
| 132 | "tests/test_setup_command.py" |
| 133 | ;; This one fails for unknown reasons. |
| 134 | "tests/test_correct_year.py")))))))) |
| 135 | (native-inputs `(("python2-mock" ,python2-mock) |
| 136 | ("python2-enum34" ,python2-enum34) |
| 137 | ,@(package-native-inputs base))) |
| 138 | ;; Sphinx 2 has some dependencies that do not support Python 2, so |
| 139 | ;; we keep our own propagated-inputs here instead of inheriting. |
| 140 | (propagated-inputs |
| 141 | `(("python2-pytz" ,python2-pytz) |
| 142 | ("python2-typing" ,python2-typing) |
| 143 | ("python2-imagesize" ,python2-imagesize) |
| 144 | ("python2-sphinx-alabaster-theme" ,python2-sphinx-alabaster-theme) |
| 145 | ("python2-babel" ,python2-babel) |
| 146 | ("python2-snowballstemmer" ,python2-snowballstemmer) |
| 147 | ("python2-docutils" ,python2-docutils-0.14) |
| 148 | ("python2-jinja2" ,python2-jinja2) |
| 149 | ("python2-packaging" ,python2-packaging) |
| 150 | ("python2-pygments" ,python2-pygments) |
| 151 | ("python2-requests" ,python2-requests) |
| 152 | ("python2-six" ,python2-six) |
| 153 | ("python2-sphinxcontrib-websupport" ,python2-sphinxcontrib-websupport)))))) |
| 154 | |
| 155 | (define-public python-sphinxcontrib-applehelp |
| 156 | (package |
| 157 | (name "python-sphinxcontrib-applehelp") |
| 158 | (version "1.0.2") |
| 159 | (source (origin |
| 160 | (method url-fetch) |
| 161 | (uri (pypi-uri "sphinxcontrib-applehelp" version)) |
| 162 | (sha256 |
| 163 | (base32 |
| 164 | "0n5wrn4l7x6gxvi1g7c6y72hkxgc223axz1jykipaxhfr1g76wm0")))) |
| 165 | (build-system python-build-system) |
| 166 | (arguments |
| 167 | `(#:tests? #f)) ;XXX: circular dependency on Sphinx |
| 168 | (home-page "https://github.com/sphinx-doc/sphinxcontrib-applehelp") |
| 169 | (synopsis "Sphinx extension for creating Apple help books") |
| 170 | (description |
| 171 | "@code{sphinxcontrib-applehelp} is a Sphinx extension which outputs |
| 172 | Apple help books.") |
| 173 | (license license:bsd-2))) |
| 174 | |
| 175 | (define-public python-sphinx-copybutton |
| 176 | (package |
| 177 | (name "python-sphinx-copybutton") |
| 178 | (version "0.2.6") |
| 179 | (source |
| 180 | (origin |
| 181 | (method url-fetch) |
| 182 | (uri (pypi-uri "sphinx-copybutton" version)) |
| 183 | (sha256 |
| 184 | (base32 |
| 185 | "0ny9jpygj93z8jyjpi4v6jjz90pmns74s389wq16igzzq2mpgfjm")))) |
| 186 | (build-system python-build-system) |
| 187 | (arguments |
| 188 | `(#:tests? #f)) ; XXX: Check requires network access. |
| 189 | (propagated-inputs |
| 190 | `(("python-flit" ,python-flit) |
| 191 | ("python-setuptools" ,python-setuptools) |
| 192 | ("python-sphinx" ,python-sphinx) |
| 193 | ("python-wheel" ,python-wheel))) |
| 194 | (home-page "https://github.com/choldgraf/sphinx-copybutton") |
| 195 | (synopsis "Sphinx extension to add \"copy\" buttons to code blocks") |
| 196 | (description |
| 197 | "This package provides a small sphinx extension to add \"copy\" buttons |
| 198 | to code blocks.") |
| 199 | (license license:expat))) |
| 200 | |
| 201 | (define-public python-sphinxcontrib-devhelp |
| 202 | (package |
| 203 | (name "python-sphinxcontrib-devhelp") |
| 204 | (version "1.0.2") |
| 205 | (source (origin |
| 206 | (method url-fetch) |
| 207 | (uri (pypi-uri "sphinxcontrib-devhelp" version)) |
| 208 | (sha256 |
| 209 | (base32 |
| 210 | "1r1qngsbjqbg4rj93kpj44qqy7n4x5khldkr0c3ffhlnggx1lzzz")))) |
| 211 | (build-system python-build-system) |
| 212 | (arguments |
| 213 | `(#:tests? #f)) ;XXX: circular dependency on Sphinx |
| 214 | (home-page "https://github.com/sphinx-doc/sphinxcontrib-devhelp") |
| 215 | (synopsis "Sphinx extension for creating Devhelp documents") |
| 216 | (description |
| 217 | "@code{sphinxcontrib-devhelp} is a Sphinx extension which outputs |
| 218 | @url{Devhelp,https://wiki.gnome.org/Apps/Devhelp} documents.") |
| 219 | (license license:bsd-2))) |
| 220 | |
| 221 | (define-public python-sphinxcontrib-github-alt |
| 222 | (package |
| 223 | (name "python-sphinxcontrib-github-alt") |
| 224 | (version "1.2") |
| 225 | (source |
| 226 | (origin |
| 227 | (method url-fetch) |
| 228 | (uri (pypi-uri "sphinxcontrib_github_alt" version)) |
| 229 | (sha256 |
| 230 | (base32 |
| 231 | "1x9af78vamjjcdrrhiah3wg613jv7gm8yh9vvqfrmf4vam6mimyg")))) |
| 232 | (build-system python-build-system) |
| 233 | (propagated-inputs |
| 234 | `(("python-docutils" ,python-docutils) |
| 235 | ("python-sphinx" ,python-sphinx))) |
| 236 | (home-page "https://github.com/jupyter/sphinxcontrib_github_alt") |
| 237 | (synopsis "Link to GitHub pages from Sphinx docs") |
| 238 | (description |
| 239 | "This package lets you link to GitHub issues, pull requests, commits and |
| 240 | users from Sphinx docs.") |
| 241 | (license license:bsd-2))) |
| 242 | |
| 243 | (define-public python-sphinxcontrib-htmlhelp |
| 244 | (package |
| 245 | (name "python-sphinxcontrib-htmlhelp") |
| 246 | (version "1.0.3") |
| 247 | (source (origin |
| 248 | (method url-fetch) |
| 249 | (uri (pypi-uri "sphinxcontrib-htmlhelp" version)) |
| 250 | (sha256 |
| 251 | (base32 |
| 252 | "16v5jdnibwrqjdr5aqchgyzpwy3rgamwhdf4kidv5nxj65zbpxg8")))) |
| 253 | (build-system python-build-system) |
| 254 | (arguments |
| 255 | `(#:tests? #f)) ;XXX: circular dependency on Sphinx |
| 256 | (home-page "https://github.com/sphinx-doc/sphinxcontrib-htmlhelp") |
| 257 | (synopsis "Sphinx extension for rendering HTML help files") |
| 258 | (description |
| 259 | "@code{sphinxcontrib-htmlhelp} is a Sphinx extension which renders |
| 260 | HTML help files.") |
| 261 | (license license:bsd-2))) |
| 262 | |
| 263 | (define-public python-sphinxcontrib-jsmath |
| 264 | (package |
| 265 | (name "python-sphinxcontrib-jsmath") |
| 266 | (version "1.0.1") |
| 267 | (source (origin |
| 268 | (method url-fetch) |
| 269 | (uri (pypi-uri "sphinxcontrib-jsmath" version)) |
| 270 | (sha256 |
| 271 | (base32 |
| 272 | "1f64w19j33sp151jimibraw6qrbhd5gxy8hs3797w9478m55x4m9")))) |
| 273 | (build-system python-build-system) |
| 274 | (arguments |
| 275 | `(#:tests? #f)) ;XXX: circular dependency on Sphinx |
| 276 | (home-page "https://github.com/sphinx-doc/sphinxcontrib-jsmath") |
| 277 | (synopsis "Sphinx extension to render math equations") |
| 278 | (description |
| 279 | "@code{sphinxcontrib-jsmath} is a Sphinx extension which renders display |
| 280 | math in HTML via JavaScript.") |
| 281 | (license license:bsd-2))) |
| 282 | |
| 283 | (define-public python-sphinxcontrib-newsfeed |
| 284 | (package |
| 285 | (name "python-sphinxcontrib-newsfeed") |
| 286 | (version "0.1.4") |
| 287 | (source (origin |
| 288 | (method url-fetch) |
| 289 | (uri (pypi-uri "sphinxcontrib-newsfeed" version)) |
| 290 | (sha256 |
| 291 | (base32 |
| 292 | "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p")))) |
| 293 | (arguments '(#:tests? #f)) ; No tests. |
| 294 | (build-system python-build-system) |
| 295 | (propagated-inputs |
| 296 | `(("python-sphinx" ,python-sphinx))) |
| 297 | (synopsis "News Feed extension for Sphinx") |
| 298 | (description "Sphinxcontrib-newsfeed is an extension for adding a simple |
| 299 | Blog, News or Announcements section to a Sphinx website.") |
| 300 | (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed") |
| 301 | (license license:bsd-2))) |
| 302 | |
| 303 | (define-public python-sphinxcontrib-programoutput |
| 304 | (package |
| 305 | (name "python-sphinxcontrib-programoutput") |
| 306 | (version "0.15") |
| 307 | (source (origin |
| 308 | (method url-fetch) |
| 309 | (uri (pypi-uri "sphinxcontrib-programoutput" version)) |
| 310 | (sha256 |
| 311 | (base32 |
| 312 | "155bz0z2cz544pphkd3nk7ph83mz7nn0ql135kzi62kqmd75ppc0")))) |
| 313 | (build-system python-build-system) |
| 314 | (arguments |
| 315 | ;; FIXME: Many tests are failing. |
| 316 | '(#:tests? #f)) |
| 317 | (propagated-inputs |
| 318 | `(("python-sphinx" ,python-sphinx))) |
| 319 | (synopsis "Sphinx extension to include program output") |
| 320 | (description "A Sphinx extension to literally insert the output of arbitrary |
| 321 | commands into documents, helping you to keep your command examples up to date.") |
| 322 | (home-page "https://github.com/NextThought/sphinxcontrib-programoutput") |
| 323 | (license license:bsd-2))) |
| 324 | |
| 325 | (define-public python2-sphinxcontrib-programoutput |
| 326 | (package-with-python2 python-sphinxcontrib-programoutput)) |
| 327 | |
| 328 | (define-public python-sphinxcontrib-qthelp |
| 329 | (package |
| 330 | (name "python-sphinxcontrib-qthelp") |
| 331 | (version "1.0.3") |
| 332 | (source (origin |
| 333 | (method url-fetch) |
| 334 | (uri (pypi-uri "sphinxcontrib-qthelp" version)) |
| 335 | (sha256 |
| 336 | (base32 |
| 337 | "0wjsp96d262shzkx7pb7pra7mmf0j8c5rz56i6x0vdsqw1z7ccsc")))) |
| 338 | (build-system python-build-system) |
| 339 | (arguments |
| 340 | `(#:tests? #f)) ;XXX: circular dependency on Sphinx |
| 341 | (home-page "https://github.com/sphinx-doc/sphinxcontrib-qthelp") |
| 342 | (synopsis "Sphinx extension to output QtHelp documents") |
| 343 | (description |
| 344 | "@code{sphinxcontrib-qthelp} is a Sphinx extension which outputs QtHelp |
| 345 | documents.") |
| 346 | (license license:bsd-2))) |
| 347 | |
| 348 | (define-public python-sphinxcontrib-serializinghtml |
| 349 | (package |
| 350 | (name "python-sphinxcontrib-serializinghtml") |
| 351 | (version "1.1.4") |
| 352 | (source (origin |
| 353 | (method url-fetch) |
| 354 | (uri (pypi-uri "sphinxcontrib-serializinghtml" version)) |
| 355 | (sha256 |
| 356 | (base32 |
| 357 | "1g3pbx0g88zd9xzcrbaypa2k60axrh92vf5j76wsk0p9hv6fr87a")))) |
| 358 | (build-system python-build-system) |
| 359 | (arguments |
| 360 | `(#:tests? #f)) ;XXX: circular dependency on Sphinx |
| 361 | (home-page "https://github.com/sphinx-doc/sphinxcontrib-serializinghtml") |
| 362 | (synopsis "Sphinx extension to serialize HTML files") |
| 363 | (description |
| 364 | "@code{sphinxcontrib-serializinghtml} is a Sphinx extension which outputs |
| 365 | \"serialized\" HTML files.") |
| 366 | (license license:bsd-2))) |
| 367 | |
| 368 | (define-public python-sphinxcontrib-svg2pdfconverter |
| 369 | (package |
| 370 | (name "python-sphinxcontrib-svg2pdfconverter") |
| 371 | (version "1.0.1") |
| 372 | (source (origin |
| 373 | (method url-fetch) |
| 374 | (uri (pypi-uri "sphinxcontrib-svg2pdfconverter" version)) |
| 375 | (sha256 |
| 376 | (base32 |
| 377 | "1hhaxmqc7wh8gnyw5jaqckliknvk0p21y12wk3bdmncgkaf9ar8f")))) |
| 378 | (build-system python-build-system) |
| 379 | (propagated-inputs |
| 380 | `(("python-sphinx" ,python-sphinx))) |
| 381 | (home-page "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter") |
| 382 | (synopsis "Sphinx SVG to PDF converter extension") |
| 383 | (description "A Sphinx extension to convert SVG images to PDF in case the |
| 384 | builder does not support SVG images natively (e.g. LaTeX).") |
| 385 | (license license:bsd-2))) |
| 386 | |
| 387 | (define-public python-sphinxcontrib-websupport |
| 388 | (package |
| 389 | (name "python-sphinxcontrib-websupport") |
| 390 | (version "1.2.0") |
| 391 | (source (origin |
| 392 | (method url-fetch) |
| 393 | (uri (pypi-uri "sphinxcontrib-websupport" version)) |
| 394 | (sha256 |
| 395 | (base32 |
| 396 | "1smma7r0rhwcmbfvvkfs5djfz1qm8wbpcvp084ca6dmw2b9zplxs")))) |
| 397 | (build-system python-build-system) |
| 398 | (arguments |
| 399 | ;; FIXME: Tests depend on Sphinx, which depends on this. |
| 400 | `(#:tests? #f)) |
| 401 | (home-page "https://sphinx-doc.org/") |
| 402 | (synopsis "Sphinx API for web applications") |
| 403 | (description "This package provides a Python API to easily integrate |
| 404 | Sphinx documentation into your web application. It provides tools to |
| 405 | integrate Sphinx documents in web templates and to handle searches.") |
| 406 | (license license:bsd-3))) |
| 407 | |
| 408 | (define-public python2-sphinxcontrib-websupport |
| 409 | (package-with-python2 python-sphinxcontrib-websupport)) |
| 410 | |
| 411 | (define-public python-sphinx-gallery |
| 412 | (package |
| 413 | (name "python-sphinx-gallery") |
| 414 | (version "0.9.0") |
| 415 | (source |
| 416 | (origin |
| 417 | (method url-fetch) |
| 418 | (uri (pypi-uri "sphinx-gallery" version)) |
| 419 | (sha256 |
| 420 | (base32 "14zyhr7m92nafhhnzfvnbgkf5m91krd9mjyi24zn59bjq6zyr8hl")))) |
| 421 | (build-system python-build-system) |
| 422 | (arguments |
| 423 | `(#:phases |
| 424 | (modify-phases %standard-phases |
| 425 | (add-before 'check 'writable-files-for-tests |
| 426 | (lambda _ |
| 427 | (for-each make-file-writable (find-files ".")))) |
| 428 | (replace 'check |
| 429 | (lambda* (#:key inputs outputs tests? #:allow-other-keys) |
| 430 | (when tests? |
| 431 | (add-installed-pythonpath inputs outputs) |
| 432 | (invoke "python" "-m" "pytest" "--pyargs" "sphinx_gallery" "-k" |
| 433 | (string-append |
| 434 | ;; These tests require online data. |
| 435 | "not test_embed_code_links_get_data" |
| 436 | " and not test_run_sphinx" |
| 437 | ;; AssertionError. |
| 438 | " and not test_embed_links_and_styles")))))))) |
| 439 | (native-inputs |
| 440 | `(("python-joblib" ,python-joblib) |
| 441 | ("python-matplotlib" ,python-matplotlib) |
| 442 | ("python-numpy" ,python-numpy) |
| 443 | ("python-pillow" ,python-pillow) |
| 444 | ("python-pytest" ,python-pytest) |
| 445 | ("python-pytest-cov" ,python-pytest-cov) |
| 446 | ("python-sphinx" ,python-sphinx))) |
| 447 | (home-page "https://sphinx-gallery.github.io/stable/index.html") |
| 448 | (synopsis "Generate an examples gallery automatically") |
| 449 | (description |
| 450 | "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version |
| 451 | from any set of Python scripts and puts it into an examples gallery.") |
| 452 | (license license:bsd-3))) |
| 453 | |
| 454 | (define-public python-sphinx-me |
| 455 | (package |
| 456 | (name "python-sphinx-me") |
| 457 | (version "0.3") |
| 458 | (source |
| 459 | (origin |
| 460 | (method url-fetch) |
| 461 | (uri (pypi-uri "sphinx-me" version)) |
| 462 | (sha256 |
| 463 | (base32 |
| 464 | "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq")))) |
| 465 | (build-system python-build-system) |
| 466 | (home-page "https://github.com/stephenmcd/sphinx-me") |
| 467 | (synopsis "Create a Sphinx documentation shell") |
| 468 | (description |
| 469 | "Create a Sphinx documentation shell for your project and include the |
| 470 | README file as the documentation index. It handles extracting the required |
| 471 | meta data such as the project name, author and version from your project for |
| 472 | use in your Sphinx docs.") |
| 473 | (license license:bsd-2))) |
| 474 | |
| 475 | (define-public python2-sphinx-me |
| 476 | (package-with-python2 python-sphinx-me)) |
| 477 | |
| 478 | (define-public python-sphinx-repoze-autointerface |
| 479 | (package |
| 480 | (name "python-sphinx-repoze-autointerface") |
| 481 | (version "0.8") |
| 482 | (source (origin |
| 483 | (method url-fetch) |
| 484 | (uri (pypi-uri "repoze.sphinx.autointerface" version)) |
| 485 | (sha256 |
| 486 | (base32 |
| 487 | "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f")))) |
| 488 | (build-system python-build-system) |
| 489 | (arguments '(#:tests? #f)) ; No tests. |
| 490 | (propagated-inputs |
| 491 | `(("python-sphinx" ,python-sphinx) |
| 492 | ("python-zope-interface" ,python-zope-interface))) |
| 493 | (synopsis "Auto-generate Sphinx API docs from Zope interfaces") |
| 494 | (description "This package defines an extension for the Sphinx documentation |
| 495 | system. The extension allows generation of API documentation by |
| 496 | introspection of @code{zope.interface} instances in code.") |
| 497 | (home-page "https://github.com/repoze/repoze.sphinx.autointerface") |
| 498 | (license license:repoze))) |
| 499 | |
| 500 | (define-public python2-sphinx-repoze-autointerface |
| 501 | (package-with-python2 python-sphinx-repoze-autointerface)) |
| 502 | |
| 503 | (define-public python-sphinx-alabaster-theme |
| 504 | (package |
| 505 | (name "python-sphinx-alabaster-theme") |
| 506 | (version "0.7.12") |
| 507 | (source (origin |
| 508 | (method url-fetch) |
| 509 | (uri (pypi-uri "alabaster" version)) |
| 510 | (sha256 |
| 511 | (base32 |
| 512 | "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6")))) |
| 513 | (build-system python-build-system) |
| 514 | (propagated-inputs |
| 515 | `(("python-pygments" ,python-pygments))) |
| 516 | (home-page "https://alabaster.readthedocs.io/") |
| 517 | (synopsis "Configurable sidebar-enabled Sphinx theme") |
| 518 | (description "Alabaster is a visually (c)lean, responsive, configurable |
| 519 | theme for the Sphinx documentation system. It's the default theme of Sphinx.") |
| 520 | (license license:bsd-3))) |
| 521 | |
| 522 | (define-public python2-sphinx-alabaster-theme |
| 523 | (package-with-python2 python-sphinx-alabaster-theme)) |
| 524 | |
| 525 | (define-public python-sphinx-argparse |
| 526 | (package |
| 527 | (name "python-sphinx-argparse") |
| 528 | (version "0.2.5") |
| 529 | (source |
| 530 | (origin |
| 531 | (method url-fetch) |
| 532 | (uri (pypi-uri "sphinx-argparse" version)) |
| 533 | (sha256 |
| 534 | (base32 "05wc8f5hb3jsg2vh2jf7jsyan8d4i09ifrz2c8fp6f7x1zw9iav0")))) |
| 535 | (build-system python-build-system) |
| 536 | (propagated-inputs |
| 537 | `(("python-sphinx" ,python-sphinx))) |
| 538 | (native-inputs |
| 539 | `(("python-commonmark" ,python-commonmark) |
| 540 | ("python-pytest" ,python-pytest) |
| 541 | ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme))) |
| 542 | (home-page "https://github.com/ribozz/sphinx-argparse") |
| 543 | (synopsis "Sphinx extension for documenting argparse commands and options") |
| 544 | (description |
| 545 | "This package is a sphinx extension that automatically documents |
| 546 | argparse commands and options") |
| 547 | (license license:expat))) |
| 548 | |
| 549 | (define-public python-sphinx-cloud-sptheme |
| 550 | (package |
| 551 | (name "python-sphinx-cloud-sptheme") |
| 552 | (version "1.8.0") |
| 553 | (source (origin |
| 554 | (method url-fetch) |
| 555 | (uri (pypi-uri "cloud_sptheme" version)) |
| 556 | (sha256 |
| 557 | (base32 |
| 558 | "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd")))) |
| 559 | (build-system python-build-system) |
| 560 | ;; FIXME: The 'pypi' release archive does not contain tests. |
| 561 | (arguments '(#:tests? #f)) |
| 562 | (native-inputs |
| 563 | `(("python-sphinx" ,python-sphinx))) |
| 564 | (home-page "https://bitbucket.org/ecollins/cloud_sptheme") |
| 565 | (synopsis "'Cloud' theme for Sphinx documenter") |
| 566 | (description "This package contains the \"Cloud\" theme for Sphinx and some |
| 567 | related extensions.") |
| 568 | (license license:bsd-3))) |
| 569 | |
| 570 | (define-public python2-sphinx-cloud-sptheme |
| 571 | (package-with-python2 python-sphinx-cloud-sptheme)) |
| 572 | |
| 573 | (define-public python-guzzle-sphinx-theme |
| 574 | (package |
| 575 | (name "python-guzzle-sphinx-theme") |
| 576 | (version "0.7.11") |
| 577 | (source |
| 578 | (origin |
| 579 | (method url-fetch) |
| 580 | (uri (pypi-uri "guzzle_sphinx_theme" version)) |
| 581 | (sha256 |
| 582 | (base32 |
| 583 | "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v")))) |
| 584 | (build-system python-build-system) |
| 585 | (propagated-inputs |
| 586 | `(("python-sphinx" ,python-sphinx))) |
| 587 | (home-page "https://github.com/guzzle/guzzle_sphinx_theme") |
| 588 | (synopsis "Sphinx theme used by Guzzle") |
| 589 | (description "This package provides guzzle_sphinx_theme, a theme for the |
| 590 | Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle} |
| 591 | and several other projects.") |
| 592 | (license license:expat))) |
| 593 | |
| 594 | (define-public python2-guzzle-sphinx-theme |
| 595 | (package-with-python2 python-guzzle-sphinx-theme)) |
| 596 | |
| 597 | (define-public python-sphinx-rtd-theme |
| 598 | (package |
| 599 | (name "python-sphinx-rtd-theme") |
| 600 | (version "0.2.4") |
| 601 | (source |
| 602 | (origin |
| 603 | (method url-fetch) |
| 604 | (uri (pypi-uri "sphinx_rtd_theme" version)) |
| 605 | (sha256 |
| 606 | (base32 |
| 607 | "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd")))) |
| 608 | (build-system python-build-system) |
| 609 | (arguments '(#:tests? #f)) ; No tests. |
| 610 | (propagated-inputs |
| 611 | `(("python-sphinx" ,python-sphinx))) |
| 612 | (home-page "https://github.com/snide/sphinx_rtd_theme/") |
| 613 | (synopsis "ReadTheDocs.org theme for Sphinx") |
| 614 | (description "A theme for Sphinx used by ReadTheDocs.org.") |
| 615 | (license license:expat))) |
| 616 | |
| 617 | (define-public python2-sphinx-rtd-theme |
| 618 | (package-with-python2 python-sphinx-rtd-theme)) |
| 619 | |
| 620 | (define-public python-breathe |
| 621 | (package |
| 622 | (name "python-breathe") |
| 623 | (version "4.30.0") |
| 624 | (source |
| 625 | (origin |
| 626 | (method url-fetch) |
| 627 | (uri (pypi-uri "breathe" version)) |
| 628 | (sha256 |
| 629 | (base32 |
| 630 | "055h95fkdld7s49878fqjx1nri1drj1czc184vrb7i60mf2yqg9n")))) |
| 631 | (build-system python-build-system) |
| 632 | (propagated-inputs |
| 633 | `(("python-docutils" ,python-docutils) |
| 634 | ("python-sphinx" ,python-sphinx))) |
| 635 | (home-page "https://github.com/michaeljones/breathe") |
| 636 | (synopsis "ReStructuredText and Sphinx bridge to Doxygen") |
| 637 | (description "This package is an extension to reStructuredText and Sphinx |
| 638 | to be able to read and render the Doxygen xml output.") |
| 639 | (license license:bsd-3))) |
| 640 | |
| 641 | (define-public python-sphinx-intl |
| 642 | (package |
| 643 | (name "python-sphinx-intl") |
| 644 | (version "2.0.1") |
| 645 | (source |
| 646 | (origin |
| 647 | (method url-fetch) |
| 648 | (uri (pypi-uri "sphinx-intl" version)) |
| 649 | (sha256 |
| 650 | (base32 "1d1q0sanjp4nkfvhsxi75zf3xjyyi8nzxvl3v7l0jy9ld70nwnmj")))) |
| 651 | (build-system python-build-system) |
| 652 | (propagated-inputs |
| 653 | `(("python-sphinx" ,python-sphinx) |
| 654 | ("python-click" ,python-click))) |
| 655 | (home-page "https://github.com/sphinx-doc/sphinx-intl") |
| 656 | (synopsis |
| 657 | "Sphinx utility that makes it easy to translate and to apply translation") |
| 658 | (description |
| 659 | "A utility tool that provides several features that make it easy to |
| 660 | translate and to apply translation to Sphinx generated document.") |
| 661 | (license license:bsd-2))) |
| 662 | |
| 663 | (define-public python-sphinx-autobuild |
| 664 | (package |
| 665 | (name "python-sphinx-autobuild") |
| 666 | (version "0.7.1") |
| 667 | (source |
| 668 | (origin |
| 669 | (method url-fetch) |
| 670 | (uri (pypi-uri "sphinx-autobuild" version)) |
| 671 | (sha256 |
| 672 | (base32 |
| 673 | "0kn753dyh3b1s0h77lbk704niyqc7bamvq6v3s1f6rj6i20qyf36")))) |
| 674 | (build-system python-build-system) |
| 675 | (arguments |
| 676 | `(#:phases |
| 677 | (modify-phases %standard-phases |
| 678 | ;; See https://github.com/GaretJax/sphinx-autobuild/pull/72 |
| 679 | (add-after 'unpack 'use-later-port-for |
| 680 | (lambda _ |
| 681 | (substitute* "requirements.txt" |
| 682 | (("port_for==.*") "port_for\n")) |
| 683 | #t)) |
| 684 | (delete 'check) |
| 685 | (add-after 'install 'check |
| 686 | (lambda* (#:key inputs outputs tests? #:allow-other-keys) |
| 687 | (when tests? |
| 688 | (add-installed-pythonpath inputs outputs) |
| 689 | (invoke "pytest" "-v")) |
| 690 | #t))))) |
| 691 | (propagated-inputs |
| 692 | `(("python-argh" ,python-argh) |
| 693 | ("python-livereload" ,python-livereload) |
| 694 | ("python-pathtools" ,python-pathtools) |
| 695 | ("python-port-for" ,python-port-for) |
| 696 | ("python-pyyaml" ,python-pyyaml) |
| 697 | ("python-tornado" ,python-tornado) |
| 698 | ("python-watchdog" ,python-watchdog))) |
| 699 | (native-inputs |
| 700 | `(("python-pytest" ,python-pytest))) |
| 701 | (home-page "https://github.com/GaretJax/sphinx-autobuild") |
| 702 | (synopsis "Rebuild Sphinx documentation when a change is detected") |
| 703 | (description |
| 704 | "This package lets you watch a Sphinx directory and rebuild the |
| 705 | documentation when a change is detected. It also includes a livereload |
| 706 | enabled web server.") |
| 707 | (license license:expat))) |
| 708 | |
| 709 | (define-public python-sphinx-autodoc-typehints |
| 710 | (package |
| 711 | (name "python-sphinx-autodoc-typehints") |
| 712 | (version "1.11.1") |
| 713 | (source |
| 714 | (origin |
| 715 | (method url-fetch) |
| 716 | (uri (pypi-uri "sphinx-autodoc-typehints" version)) |
| 717 | (sha256 |
| 718 | (base32 |
| 719 | "086v9mg21pvfx0lfqjx2xf36hnzrsripfg345xi59f7xwb9scjr4")))) |
| 720 | (build-system python-build-system) |
| 721 | (propagated-inputs |
| 722 | `(("python-setuptools-scm" ,python-setuptools-scm) |
| 723 | ("python-sphinx" ,python-sphinx))) |
| 724 | (native-inputs |
| 725 | `(("python-dataclasses" ,python-dataclasses) |
| 726 | ("python-pytest" ,python-pytest) |
| 727 | ("python-sphinx" ,python-sphinx) |
| 728 | ("python-sphobjinv" ,python-sphobjinv) |
| 729 | ("python-typing-extensions" ,python-typing-extensions))) |
| 730 | (home-page "https://pypi.org/project/sphinx-autodoc-typehints/") |
| 731 | (synopsis "Type hints for the Sphinx autodoc extension") |
| 732 | (description "This extension allows you to use Python 3 annotations for |
| 733 | documenting acceptable argument types and return value types of functions.") |
| 734 | (license license:expat))) |
| 735 | |
| 736 | (define-public python-nbsphinx |
| 737 | (package |
| 738 | (name "python-nbsphinx") |
| 739 | (version "0.7.1") |
| 740 | (source |
| 741 | (origin |
| 742 | (method url-fetch) |
| 743 | (uri (pypi-uri "nbsphinx" version)) |
| 744 | (sha256 |
| 745 | (base32 |
| 746 | "0j56bxdj08vn3q1804qwb1ywhga1mdg1awgm7i64wfpfwi8df2zm")))) |
| 747 | (build-system python-build-system) |
| 748 | (propagated-inputs |
| 749 | `(("python-docutils" ,python-docutils) |
| 750 | ("python-jinja2" ,python-jinja2) |
| 751 | ("python-nbconvert" ,python-nbconvert) |
| 752 | ("python-nbformat" ,python-nbformat) |
| 753 | ("python-sphinx" ,python-sphinx) |
| 754 | ("python-traitlets" ,python-traitlets))) |
| 755 | (home-page "https://nbsphinx.readthedocs.io/") |
| 756 | (synopsis "Jupyter Notebook Tools for Sphinx") |
| 757 | (description "@code{python-nbsphinx} is a Sphinx extension that |
| 758 | provides a source parser for @code{*.ipynb} files. Custom Sphinx |
| 759 | directives are used to show Jupyter Notebook code cells (and of course |
| 760 | their results) in both HTML and LaTeX output. Un-evaluated notebooks |
| 761 | - i.e. notebooks without stored output cells - will be automatically |
| 762 | executed during the Sphinx build process.") |
| 763 | (license license:expat))) |
| 764 | |
| 765 | (define-public python-sphobjinv |
| 766 | (package |
| 767 | (name "python-sphobjinv") |
| 768 | (version "2.0.1") |
| 769 | (source |
| 770 | (origin |
| 771 | (method url-fetch) |
| 772 | (uri (pypi-uri "sphobjinv" version)) |
| 773 | (sha256 |
| 774 | (base32 |
| 775 | "126lgm54c94ay3fci512ap4l607gak90pbz0fk98syxvj5izrrzx")))) |
| 776 | (build-system python-build-system) |
| 777 | (propagated-inputs |
| 778 | `(("python-attrs" ,python-attrs) |
| 779 | ("python-certifi" ,python-certifi) |
| 780 | ("python-fuzzywuzzy" ,python-fuzzywuzzy) |
| 781 | ("python-jsonschema" ,python-jsonschema) |
| 782 | ("python-levenshtein" ,python-levenshtein))) |
| 783 | (home-page "https://github.com/bskinn/sphobjinv") |
| 784 | (synopsis "Sphinx cross-reference tool") |
| 785 | (description "Sphinx objects.inv inspection/manipulation tool.") |
| 786 | (license license:expat))) |
| 787 | |
| 788 | (define-public python-jupyter-sphinx |
| 789 | (package |
| 790 | (name "python-jupyter-sphinx") |
| 791 | (version "0.3.2") |
| 792 | (source |
| 793 | (origin |
| 794 | (method url-fetch) |
| 795 | (uri (pypi-uri "jupyter_sphinx" version)) |
| 796 | (sha256 |
| 797 | (base32 |
| 798 | "1wma60787m2451nn4bc4jw7bzqksplplb84wqxm34iaw70499z1p")))) |
| 799 | (build-system python-build-system) |
| 800 | (propagated-inputs |
| 801 | `(("python-ipython" ,python-ipython) |
| 802 | ("python-ipywidgets" ,python-ipywidgets) |
| 803 | ("python-nbconvert" ,python-nbconvert) |
| 804 | ("python-nbformat" ,python-nbformat))) |
| 805 | (native-inputs |
| 806 | `(("python-sphinx" ,python-sphinx))) |
| 807 | (home-page "https://github.com/jupyter/jupyter-sphinx/") |
| 808 | (synopsis "Jupyter Sphinx Extensions") |
| 809 | (description |
| 810 | "Jupyter-sphinx is a Sphinx extension that executes embedded code in a |
| 811 | Jupyter kernel, and embeds outputs of that code in the document. It has |
| 812 | support for rich output such as images, LaTeX math and even JavaScript |
| 813 | widgets, and supports thebelab for live code execution with minimal effort.") |
| 814 | (license license:bsd-3))) |