diff options
Diffstat (limited to 'gnu/packages/sphinx.scm')
-rw-r--r-- | gnu/packages/sphinx.scm | 55 |
1 files changed, 45 insertions, 10 deletions
diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm index 0090ddbddd..1bc7149c24 100644 --- a/gnu/packages/sphinx.scm +++ b/gnu/packages/sphinx.scm @@ -30,6 +30,7 @@ (define-module (gnu packages sphinx) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix build-system python) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) @@ -44,14 +45,14 @@ (define-public python-sphinx (package (name "python-sphinx") - (version "1.7.7") + (version "2.0.1") (source (origin (method url-fetch) (uri (pypi-uri "Sphinx" version)) (sha256 (base32 - "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi")))) + "0js0rnbzm0nsb4gm2v4z79wlbmr05awqzic57kfl8ydkdxj80cj2")))) (build-system python-build-system) (arguments `(#:phases @@ -63,11 +64,6 @@ (substitute* "tests/test_build_latex.py" (("@pytest.mark.sphinx\\('latex', testroot='images'\\)") "@pytest.mark.skip()")) - (when (which "python") - ;; XXX: These tests are broken when using Python2: - ;; <https://github.com/sphinx-doc/sphinx/issues/4710>. - (delete-file "tests/test_api_translator.py") - (delete-file "tests/test_setup_command.py")) (invoke "make" "test")))))) (propagated-inputs `(("python-imagesize" ,python-imagesize) @@ -80,8 +76,13 @@ ("python-packaging" ,python-packaging) ("python-pygments" ,python-pygments) ("python-requests" ,python-requests) - ("python-six" ,python-six) - ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport))) + ("python-sphinxcontrib-applehelp" ,python-sphinxcontrib-applehelp) + ("python-sphinxcontrib-devhelp" ,python-sphinxcontrib-devhelp) + ("python-sphinxcontrib-htmlhelp" ,python-sphinxcontrib-htmlhelp) + ("python-sphinxcontrib-jsmath" ,python-sphinxcontrib-jsmath) + ("python-sphinxcontrib-qthelp" ,python-sphinxcontrib-qthelp) + ("python-sphinxcontrib-serializinghtml" + ,python-sphinxcontrib-serializinghtml))) (native-inputs `(("graphviz" ,graphviz) ("imagemagick" ,imagemagick) ;for "convert" @@ -97,16 +98,50 @@ sources.") (license license:bsd-3) (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 (inherit base) + (version "1.7.7") + (source (origin + (method url-fetch) + (uri (pypi-uri "Sphinx" version)) + (sha256 + (base32 + "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi")))) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + `(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)))))) (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) - ,@(package-propagated-inputs base)))))) + ("python2-imagesize" ,python2-imagesize) + ("python2-sphinx-alabaster-theme" + ,python2-sphinx-alabaster-theme) + ("python2-babel" ,python2-babel) + ("python2-snowballstemmer" ,python2-snowballstemmer) + ("python2-docutils" ,python2-docutils) + ("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 |