diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-05-12 23:52:12 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-05-24 23:24:09 +0200 |
commit | d309b36d30c03a59ffd867c0ff97ca7789337c68 (patch) | |
tree | c4d9f1b8e9022a167f5a416c67482ef310653395 /gnu/packages | |
parent | 224d2e2efd1ccefaab0e3c10b0ab07451f436d27 (diff) | |
download | guix-d309b36d30c03a59ffd867c0ff97ca7789337c68.tar.gz |
gnu: python-sphinx: Update to 2.0.1.
* gnu/packages/sphinx.scm (python-sphinx): Update to 2.0.1. [arguments]: Remove Python2 workaround. [propagated-inputs]: Remove PYTHON-SIX and PYTHON-SPHINXCONTRIB-WEBSUPPORT. Add PYTHON-SPHINXCONTRIB-APPLEHELP, PYTHON-SPHINXCONTRIB-DEVHELP, PYTHON-SPHINXCONTRIB-HTMLHELP, PYTHON-SPHINXCONTRIB-JSMATH, PYTHON-SPHINXCONTRIB-QTHELP, and PYTHON-SPHINXCONTRIB-SERIALIZINGHTML. (python2-sphinx)[source]: Stay on version 1.7.7. [arguments]: New field. [propagated-inputs]: Do not inherit from the Python 3 Sphinx variant.
Diffstat (limited to 'gnu/packages')
-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 |