GNU bug report logs - #48737
[PATCH] gnu: python-sphinx-gallery: Update to 0.9.0.

Previous Next

Package: guix-patches;

Reported by: Vinicius Monego <monego <at> posteo.net>

Date: Sun, 30 May 2021 04:07:02 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48737 in the body.
You can then email your comments to 48737 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#48737; Package guix-patches. (Sun, 30 May 2021 04:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vinicius Monego <monego <at> posteo.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 30 May 2021 04:07:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH] gnu: python-sphinx-gallery: Update to 0.9.0.
Date: Sun, 30 May 2021 04:05:16 +0000
* 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 <at> gnu.org>
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul <at> autistici.org>
 ;;; Copyright © 2021 Eric Bavier <bavier <at> posteo.net>
+;;; Copyright © 2021 Vinicius Monego <monego <at> 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 sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Wed, 02 Jun 2021 07:25:01 GMT) Full text and rfc822 format available.

Notification sent to Vinicius Monego <monego <at> posteo.net>:
bug acknowledged by developer. (Wed, 02 Jun 2021 07:25:01 GMT) Full text and rfc822 format available.

Message #10 received at 48737-done <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Vinicius Monego <monego <at> posteo.net>
Cc: 48737-done <at> debbugs.gnu.org
Subject: Re: [bug#48737] [PATCH] gnu: python-sphinx-gallery: Update to 0.9.0.
Date: Wed, 2 Jun 2021 10:23:49 +0300
[Message part 1 (text/plain, inline)]
I did try to build python-matplotlib-documentation but the texlive-union
is currently broken.

Normally this would be two patches, one to upgrade to 0.9.0 and a second
to enable the tests, but I'll leave it as-is. I changed the commit
message from 'Remove #:tests?' to 'Enable tests' and I mentioned the two
new phases.

Patch pushed!

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 30 Jun 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 301 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.