gnu: python-sphinx-gallery: Update to 0.9.0.

* gnu/packages/sphinx.scm (python-sphinx-gallery): Update to 0.9.0.
[source]: Build from PyPI.
[arguments]: Enable tests. Add custom 'check phase and phase to make
test files writable.
[native-inputs]: Add python-joblib, python-matplotlib, python-numpy,
python-pillow, python-pytest, python-pytest-cov, python-sphinx. Remove
python-pytest-runner.
[home-page]: Follow redirect.
(python2-sphinx-gallery): Remove package.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
Vinicius Monego 2021-05-30 04:05:16 +00:00 committed by Efraim Flashner
parent 841edfa491
commit 51e8539566
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -15,6 +15,7 @@
;;; Copyright © 2019 Brett Gilio <brettg@gnu.org> ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org> ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2021 Eric Bavier <bavier@posteo.net> ;;; Copyright © 2021 Eric Bavier <bavier@posteo.net>
;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -409,34 +410,46 @@ (define-public python2-sphinxcontrib-websupport
(define-public python-sphinx-gallery (define-public python-sphinx-gallery
(package (package
(name "python-sphinx-gallery") (name "python-sphinx-gallery")
(version "0.1.13") (version "0.9.0")
(source (origin (source
(method git-fetch) (origin
(uri (git-reference (method url-fetch)
(url "https://github.com/sphinx-gallery/sphinx-gallery") (uri (pypi-uri "sphinx-gallery" version))
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32 "14zyhr7m92nafhhnzfvnbgkf5m91krd9mjyi24zn59bjq6zyr8hl"))))
"14nbqh9krx2l2y2ylbln6l6w8iak3wac1lngvaf278y1cx7685kg"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>, `(#:phases
;; <https://docs.scipy.org/doc/numpy/objects.inv>, and (modify-phases %standard-phases
;; <https://matplotlib.org/objects.inv>. (add-before 'check 'writable-files-for-tests
`(#:tests? #f)) (lambda _
(for-each make-file-writable (find-files "."))))
(replace 'check
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
(when tests?
(add-installed-pythonpath inputs outputs)
(invoke "python" "-m" "pytest" "--pyargs" "sphinx_gallery" "-k"
(string-append
;; These tests require online data.
"not test_embed_code_links_get_data"
" and not test_run_sphinx"
;; AssertionError.
" and not test_embed_links_and_styles"))))))))
(native-inputs (native-inputs
`(("python-pytest-runner" ,python-pytest-runner))) `(("python-joblib" ,python-joblib)
(home-page "https://sphinx-gallery.github.io/") ("python-matplotlib" ,python-matplotlib)
("python-numpy" ,python-numpy)
("python-pillow" ,python-pillow)
("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)
("python-sphinx" ,python-sphinx)))
(home-page "https://sphinx-gallery.github.io/stable/index.html")
(synopsis "Generate an examples gallery automatically") (synopsis "Generate an examples gallery automatically")
(description (description
"@code{sphinx_gallery} is a Sphinx extension that builds an HTML version "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
from any set of Python scripts and puts it into an examples gallery.") from any set of Python scripts and puts it into an examples gallery.")
(license license:bsd-3))) (license license:bsd-3)))
(define-public python2-sphinx-gallery
(package-with-python2 python-sphinx-gallery))
(define-public python-sphinx-me (define-public python-sphinx-me
(package (package
(name "python-sphinx-me") (name "python-sphinx-me")