unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: 48737@debbugs.gnu.org
Cc: Vinicius Monego <monego@posteo.net>
Subject: [bug#48737] [PATCH] gnu: python-sphinx-gallery: Update to 0.9.0.
Date: Sun, 30 May 2021 04:05:16 +0000	[thread overview]
Message-ID: <20210530040516.84257-1-monego@posteo.net> (raw)

* gnu/packages/sphinx.scm (python-sphinx-gallery): Update to 0.9.0.
[source]: Build from PyPI.
[arguments]: Remove #:tests?. Add #:phases.
[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.
---
I didn't try to rebuild python-matplotlib-documentation which is the only dependent.

 gnu/packages/sphinx.scm | 51 ++++++++++++++++++++++++++---------------
 1 file changed, 32 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
index 14bc3f5a79..428a701d87 100644
--- a/gnu/packages/sphinx.scm
+++ b/gnu/packages/sphinx.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2021 Eric Bavier <bavier@posteo.net>
+;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -409,34 +410,46 @@ integrate Sphinx documents in web templates and to handle searches.")
 (define-public python-sphinx-gallery
   (package
     (name "python-sphinx-gallery")
-    (version "0.1.13")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                     (url "https://github.com/sphinx-gallery/sphinx-gallery")
-                     (commit (string-append "v" version))))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "14nbqh9krx2l2y2ylbln6l6w8iak3wac1lngvaf278y1cx7685kg"))))
+    (version "0.9.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "sphinx-gallery" version))
+       (sha256
+        (base32 "14zyhr7m92nafhhnzfvnbgkf5m91krd9mjyi24zn59bjq6zyr8hl"))))
     (build-system python-build-system)
     (arguments
-     ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
-     ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
-     ;; <https://matplotlib.org/objects.inv>.
-     `(#:tests? #f))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'writable-files-for-tests
+           (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
-     `(("python-pytest-runner" ,python-pytest-runner)))
-    (home-page "https://sphinx-gallery.github.io/")
+     `(("python-joblib" ,python-joblib)
+       ("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")
     (description
      "@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.")
     (license license:bsd-3)))
 
-(define-public python2-sphinx-gallery
-  (package-with-python2 python-sphinx-gallery))
-
 (define-public python-sphinx-me
   (package
     (name "python-sphinx-me")
-- 
2.31.1





             reply	other threads:[~2021-05-30  4:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-30  4:05 Vinicius Monego [this message]
2021-06-02  7:23 ` bug#48737: [PATCH] gnu: python-sphinx-gallery: Update to 0.9.0 Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210530040516.84257-1-monego@posteo.net \
    --to=monego@posteo.net \
    --cc=48737@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).