gnu: linux-libre 5.4: Update to 5.4.113.
[jackhill/guix/guix.git] / gnu / packages / sphinx.scm
index ff5d8e5..4aeed10 100644 (file)
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 David Thompson <davet@gnu.org>
-;;; Copyright © 2015, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2017, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2017 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2019, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2019 Alexandros Theodotou <alex@zrythm.org>
 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
+;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2021 Eric Bavier <bavier@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,6 +43,8 @@
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
+  #:use-module (gnu packages python-build)
+  #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages time))
 (define-public python-sphinx
   (package
     (name "python-sphinx")
-    (version "2.3.1")
+    (version "3.3.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Sphinx" version))
        (sha256
         (base32
-         "19a28nsb0w4bs6k8rdfyk6vzrcwdpvhs2wq77rgpmww59yvndrz6"))))
+         "0023vc2i29pjxmvdqbz1wdbi7gbj56y1br1b2z8h8wa44li5k38y"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -102,7 +106,6 @@ sources.")
     (properties `((python2-variant . ,(delay python2-sphinx))))))
 
 ;; Sphinx 2 does not support Python 2, so we stick with this older version here.
-;; Remove this package once python2-pbcore no longer requires it.
 (define-public python2-sphinx
   (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
     (package
@@ -120,31 +123,32 @@ sources.")
           `(modify-phases ,phases
              (add-before 'check 'disable-broken-tests
                (lambda _
-                 ;; These tests are broken when using Python2:
-                 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
-                 (for-each delete-file '("tests/test_api_translator.py"
-                                         "tests/test_setup_command.py"))
-                 #t))))))
+                 (for-each delete-file
+                           ;; These tests are broken when using Python2:
+                           ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
+                           '("tests/test_api_translator.py"
+                             "tests/test_setup_command.py"
+                             ;; This one fails for unknown reasons.
+                             "tests/test_correct_year.py"))))))))
       (native-inputs `(("python2-mock" ,python2-mock)
                        ("python2-enum34" ,python2-enum34)
                        ,@(package-native-inputs base)))
       ;; Sphinx 2 has some dependencies that do not support Python 2, so
       ;; we keep our own propagated-inputs here instead of inheriting.
-      (propagated-inputs `(("python2-pytz" ,python2-pytz)
-                           ("python2-typing" ,python2-typing)
-                           ("python2-imagesize" ,python2-imagesize)
-                           ("python2-sphinx-alabaster-theme"
-                            ,python2-sphinx-alabaster-theme)
-                           ("python2-babel" ,python2-babel-2.6)
-                           ("python2-snowballstemmer" ,python2-snowballstemmer)
-                           ("python2-docutils" ,python2-docutils-0.14)
-                           ("python2-jinja2" ,python2-jinja2)
-                           ("python2-packaging" ,python2-packaging)
-                           ("python2-pygments" ,python2-pygments)
-                           ("python2-requests" ,python2-requests)
-                           ("python2-six" ,python2-six)
-                           ("python2-sphinxcontrib-websupport"
-                            ,python2-sphinxcontrib-websupport))))))
+      (propagated-inputs
+       `(("python2-pytz" ,python2-pytz)
+         ("python2-typing" ,python2-typing)
+         ("python2-imagesize" ,python2-imagesize)
+         ("python2-sphinx-alabaster-theme" ,python2-sphinx-alabaster-theme)
+         ("python2-babel" ,python2-babel)
+         ("python2-snowballstemmer" ,python2-snowballstemmer)
+         ("python2-docutils" ,python2-docutils-0.14)
+         ("python2-jinja2" ,python2-jinja2)
+         ("python2-packaging" ,python2-packaging)
+         ("python2-pygments" ,python2-pygments)
+         ("python2-requests" ,python2-requests)
+         ("python2-six" ,python2-six)
+         ("python2-sphinxcontrib-websupport" ,python2-sphinxcontrib-websupport))))))
 
 (define-public python-sphinxcontrib-applehelp
   (package
@@ -212,6 +216,28 @@ to code blocks.")
 @url{Devhelp,https://wiki.gnome.org/Apps/Devhelp} documents.")
     (license license:bsd-2)))
 
+(define-public python-sphinxcontrib-github-alt
+  (package
+    (name "python-sphinxcontrib-github-alt")
+    (version "1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "sphinxcontrib_github_alt" version))
+       (sha256
+        (base32
+         "1x9af78vamjjcdrrhiah3wg613jv7gm8yh9vvqfrmf4vam6mimyg"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-docutils" ,python-docutils)
+       ("python-sphinx" ,python-sphinx)))
+    (home-page "https://github.com/jupyter/sphinxcontrib_github_alt")
+    (synopsis "Link to GitHub pages from Sphinx docs")
+    (description
+     "This package lets you link to GitHub issues, pull requests, commits and
+users from Sphinx docs.")
+    (license license:bsd-2)))
+
 (define-public python-sphinxcontrib-htmlhelp
   (package
     (name "python-sphinxcontrib-htmlhelp")
@@ -482,6 +508,30 @@ theme for the Sphinx documentation system.  It's the default theme of Sphinx.")
 (define-public python2-sphinx-alabaster-theme
   (package-with-python2 python-sphinx-alabaster-theme))
 
+(define-public python-sphinx-argparse
+  (package
+    (name "python-sphinx-argparse")
+    (version "0.2.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "sphinx-argparse" version))
+       (sha256
+        (base32 "05wc8f5hb3jsg2vh2jf7jsyan8d4i09ifrz2c8fp6f7x1zw9iav0"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-sphinx" ,python-sphinx)))
+    (native-inputs
+     `(("python-commonmark" ,python-commonmark)
+       ("python-pytest" ,python-pytest)
+       ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
+    (home-page "https://github.com/ribozz/sphinx-argparse")
+    (synopsis "Sphinx extension for documenting argparse commands and options")
+    (description
+     "This package is a sphinx extension that automatically documents
+argparse commands and options")
+    (license license:expat)))
+
 (define-public python-sphinx-cloud-sptheme
   (package
     (name "python-sphinx-cloud-sptheme")
@@ -556,14 +606,14 @@ and several other projects.")
 (define-public python-breathe
   (package
     (name "python-breathe")
-    (version "4.13.1")
+    (version "4.22.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "breathe" version))
        (sha256
         (base32
-         "1aw749n2ry27434qd7gr99dvsrs3x3chyi9aywmhjj1g4m2j6xf6"))))
+         "0snk538xv60z4vfhl3f7v5g658za7257hddkg07cknkn33k6cjvf"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-docutils" ,python-docutils)
@@ -578,14 +628,13 @@ to be able to read and render the Doxygen xml output.")
 (define-public python-sphinx-intl
   (package
     (name "python-sphinx-intl")
-    (version "2.0.0")
+    (version "2.0.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "sphinx-intl" version))
        (sha256
-        (base32
-         "0zbf1bh23b3kza8bnjykmv2k21xmmr4gamhi3lnicnr6ypnrphr5"))))
+        (base32 "1d1q0sanjp4nkfvhsxi75zf3xjyyi8nzxvl3v7l0jy9ld70nwnmj"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-sphinx" ,python-sphinx)
@@ -597,3 +646,128 @@ to be able to read and render the Doxygen xml output.")
      "A utility tool that provides several features that make it easy to
 translate and to apply translation to Sphinx generated document.")
     (license license:bsd-2)))
+
+(define-public python-sphinx-autobuild
+  (package
+    (name "python-sphinx-autobuild")
+    (version "0.7.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "sphinx-autobuild" version))
+       (sha256
+        (base32
+         "0kn753dyh3b1s0h77lbk704niyqc7bamvq6v3s1f6rj6i20qyf36"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; See https://github.com/GaretJax/sphinx-autobuild/pull/72
+         (add-after 'unpack 'use-later-port-for
+           (lambda _
+             (substitute* "requirements.txt"
+               (("port_for==.*") "port_for\n"))
+             #t))
+         (delete 'check)
+         (add-after 'install 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "pytest" "-v"))
+             #t)))))
+    (propagated-inputs
+     `(("python-argh" ,python-argh)
+       ("python-livereload" ,python-livereload)
+       ("python-pathtools" ,python-pathtools)
+       ("python-port-for" ,python-port-for)
+       ("python-pyyaml" ,python-pyyaml)
+       ("python-tornado" ,python-tornado)
+       ("python-watchdog" ,python-watchdog)))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/GaretJax/sphinx-autobuild")
+    (synopsis "Rebuild Sphinx documentation when a change is detected")
+    (description
+     "This package lets you watch a Sphinx directory and rebuild the
+documentation when a change is detected.  It also includes a livereload
+enabled web server.")
+    (license license:expat)))
+
+(define-public python-sphinx-autodoc-typehints
+  (package
+    (name "python-sphinx-autodoc-typehints")
+    (version "1.11.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "sphinx-autodoc-typehints" version))
+       (sha256
+        (base32
+         "086v9mg21pvfx0lfqjx2xf36hnzrsripfg345xi59f7xwb9scjr4"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-setuptools-scm" ,python-setuptools-scm)
+       ("python-sphinx" ,python-sphinx)))
+    (native-inputs
+     `(("python-dataclasses" ,python-dataclasses)
+       ("python-pytest" ,python-pytest)
+       ("python-sphinx" ,python-sphinx)
+       ("python-sphobjinv" ,python-sphobjinv)
+       ("python-typing-extensions" ,python-typing-extensions)))
+    (home-page "https://pypi.org/project/sphinx-autodoc-typehints/")
+    (synopsis "Type hints for the Sphinx autodoc extension")
+    (description "This extension allows you to use Python 3 annotations for
+documenting acceptable argument types and return value types of functions.")
+    (license license:expat)))
+
+(define-public python-nbsphinx
+  (package
+    (name "python-nbsphinx")
+    (version "0.7.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "nbsphinx" version))
+        (sha256
+          (base32
+            "0j56bxdj08vn3q1804qwb1ywhga1mdg1awgm7i64wfpfwi8df2zm"))))
+    (build-system python-build-system)
+    (propagated-inputs
+      `(("python-docutils" ,python-docutils)
+        ("python-jinja2" ,python-jinja2)
+        ("python-nbconvert" ,python-nbconvert)
+        ("python-nbformat" ,python-nbformat)
+        ("python-sphinx" ,python-sphinx)
+        ("python-traitlets" ,python-traitlets)))
+    (home-page "https://nbsphinx.readthedocs.io/")
+    (synopsis "Jupyter Notebook Tools for Sphinx")
+    (description "@code{python-nbsphinx} is a Sphinx extension that
+provides a source parser for @code{*.ipynb} files.  Custom Sphinx
+directives are used to show Jupyter Notebook code cells (and of course
+their results) in both HTML and LaTeX output.  Un-evaluated notebooks
+- i.e. notebooks without stored output cells - will be automatically
+executed during the Sphinx build process.")
+    (license license:expat)))
+
+(define-public python-sphobjinv
+  (package
+    (name "python-sphobjinv")
+    (version "2.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "sphobjinv" version))
+       (sha256
+        (base32
+         "126lgm54c94ay3fci512ap4l607gak90pbz0fk98syxvj5izrrzx"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-attrs" ,python-attrs)
+       ("python-certifi" ,python-certifi)
+       ("python-fuzzywuzzy" ,python-fuzzywuzzy)
+       ("python-jsonschema" ,python-jsonschema)
+       ("python-levenshtein" ,python-levenshtein)))
+    (home-page "https://github.com/bskinn/sphobjinv")
+    (synopsis "Sphinx cross-reference tool")
+    (description "Sphinx objects.inv inspection/manipulation tool.")
+    (license license:expat)))