guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: python-jupyter-sphinx: Run tests.


From: guix-commits
Subject: 02/02: gnu: python-jupyter-sphinx: Run tests.
Date: Thu, 17 Mar 2022 08:54:34 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit 1c85338cdd759e913696deec77b2b215e9cbecc6
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Thu Mar 17 14:52:44 2022 +0200

    gnu: python-jupyter-sphinx: Run tests.
    
    * gnu/packages/sphinx.scm (python-jupyter-sphinx)[source]: Download
    using git-fetch.
    [arguments]: Use custom 'check phase.
    [native-inputs]: Add python-pytest.
---
 gnu/packages/sphinx.scm | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
index dfbc3194ea..69a92b8b97 100644
--- a/gnu/packages/sphinx.scm
+++ b/gnu/packages/sphinx.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
 ;;; Copyright © 2017 Christine Lemmer-Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
-;;; Copyright © 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2019, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2019, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2019 Alexandros Theodotou <alex@zrythm.org>
 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
@@ -38,6 +38,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix build-system python)
   #:use-module ((guix licenses) #:prefix license:)
@@ -911,17 +912,29 @@ executed during the Sphinx build process.")
     (version "0.3.2")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "jupyter_sphinx" version))
+       ;; Pypi tarball doesn't contain tests.
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/jupyter/jupyter-sphinx";)
+              (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
         (base32
-         "1wma60787m2451nn4bc4jw7bzqksplplb84wqxm34iaw70499z1p"))))
+         "0bsb17vzbgvrzvh87pi88b157hyigdwnf1lhrgvan03i2300h15c"))))
     (build-system python-build-system)
+    (arguments
+     (list
+       #:phases
+       #~(modify-phases %standard-phases
+           (replace 'check
+             (lambda* (#:key tests? #:allow-other-keys)
+               (when tests?
+                 (invoke "pytest")))))))
     (propagated-inputs
      (list python-ipython python-ipywidgets python-nbconvert
            python-nbformat))
     (native-inputs
-     (list python-sphinx))
+     (list python-pytest python-sphinx))
     (home-page "https://github.com/jupyter/jupyter-sphinx/";)
     (synopsis "Jupyter Sphinx Extensions")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]