From 22e223e4890ea95c6fb526c52b067497cdcce0c7 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 7 Jul 2022 14:55:54 +0200 Subject: gnu: Add python-nbstripout. * gnu/packages/jupyter.scm (python-nbstripout): New variable. --- gnu/packages/jupyter.scm | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'gnu/packages/jupyter.scm') diff --git a/gnu/packages/jupyter.scm b/gnu/packages/jupyter.scm index 441e19bf47..20c72a7437 100644 --- a/gnu/packages/jupyter.scm +++ b/gnu/packages/jupyter.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019, 2022 Ludovic Courtès -;;; Copyright © 2021 Ricardo Wurmus +;;; Copyright © 2021, 2022 Ricardo Wurmus ;;; Copyright © 2021 Hugo Lecomte ;;; Copyright © 2022 Marius Bakke ;;; Copyright © 2022 Maxim Cournoyer @@ -521,6 +521,44 @@ (define-public python-nbdime @end table") (license license:bsd-3))) +(define-public python-nbstripout + (package + (name "python-nbstripout") + (version "0.5.0") + (source (origin + (method url-fetch) + (uri (pypi-uri "nbstripout" version)) + (sha256 + (base32 + "1n57nvxsc94gz9w8ymi83bjkfhfwkpmx4y14m6gjrmlqd49m1aw6")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'delete-bad-tests + (lambda _ + ;; These tests use git and hg, and they are sensitive to the + ;; exact printed output. + (for-each delete-file (list "tests/test-git.t" + "tests/test-hg.t" + "tests/test-status.t" + "tests/test-uninstall.t")))) + (add-before 'check 'set-CRAMSHELL + (lambda _ + (setenv "CRAMSHELL" (which "bash"))))))) + (propagated-inputs (list python-nbformat)) + (native-inputs + (list python-pytest + python-pytest-cram + python-pytest-flake8 + python-pytest-runner)) + (home-page "https://github.com/kynan/nbstripout") + (synopsis "Strips outputs from Jupyter and IPython notebooks") + (description + "This package opens a notebook, strips its output, and writes the outputless +version to the original file.") + (license license:expat))) + (define-public repo2docker (package (name "repo2docker") -- cgit v1.2.3