aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2025-05-08 11:28:40 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-05-08 12:05:04 +0100
commit6704f7134e1342b1f47983fb98e58d58ff4c509b (patch)
tree373aa33959dce771cc612941cce99cd7648316d5
parentde0ec3749e2eefb28cc13d77db0f6fcc0a325c27 (diff)
downloadguix-6704f7134e1342b1f47983fb98e58d58ff4c509b.tar.gz
guix-6704f7134e1342b1f47983fb98e58d58ff4c509b.zip
gnu: python-notebook: Move to jupyter.
* gnu/packages/python-xyz.scm (python-notebook): Move from here ... * gnu/packages/jupyter.scm: ... to here. * gnu/packages/sagemath.scm: Add jupyter module. Change-Id: I44aca3a14573b7700cdedeaae5e05b11ad48371c
-rw-r--r--gnu/packages/jupyter.scm92
-rw-r--r--gnu/packages/python-xyz.scm85
-rw-r--r--gnu/packages/sagemath.scm1
3 files changed, 91 insertions, 87 deletions
diff --git a/gnu/packages/jupyter.scm b/gnu/packages/jupyter.scm
index 9564d6ef6b..ada5afaeec 100644
--- a/gnu/packages/jupyter.scm
+++ b/gnu/packages/jupyter.scm
@@ -1,10 +1,13 @@
;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016, 2019, 2021-2025 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2019, 2021, 2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2019, 2022 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2019, 2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
-;;; Copyright © 2021-2025 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
+;;; Copyright © 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
;;; Copyright © 2024-2025 Sharlatan Hellseher <sharlatanus@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -108,6 +111,91 @@ the custom classic notebook experience under a new set of URL endpoints, under
the namespace @code{/nbclassic/}.")
(license license:bsd-3)))
+(define-public python-notebook
+ (package
+ (name "python-notebook")
+ (version "6.5.7")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "notebook" version))
+ (sha256
+ (base32
+ "1r38fwr0r4xgkz8y27w3xyz2dk97ih5azba28jylyqxcvw8r1sq4"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-flags
+ '(list "-k" (string-append
+ ;; TODO: This tests fails because nbconvert does not
+ ;; list "python" as a format.
+ "not test_list_formats"
+ ;; AssertionError: Lists differ:
+ " and not test_disable"
+ " and not test_enable"
+ " and not test_merge_config"
+ " and not test_load_ordered"
+ " and not test_list_running_sock_servers"
+ " and not test_run")
+ ;; These tests require a browser.
+ "--ignore=notebook/tests/selenium")
+ #:phases
+ '(modify-phases %standard-phases
+ (add-after 'unpack 'use-our-home-for-tests
+ (lambda _
+ ;; The 'get_patch_env' function in this file reads:
+ ;; 'HOME': cls.home_dir
+ ;; but for some reason, that definition of HOME is not what the
+ ;; GLib/GIO trash mechanism honors, which would cause test
+ ;; failures. Instead, set 'HOME' here to an existing directory
+ ;; and let the tests honor it.
+ (substitute* "notebook/tests/launchnotebook.py"
+ (("'HOME': .*," all)
+ (string-append "# " all "\n")))
+ (setenv "HOME" (getcwd))))
+ ;; Because python-jsonschema has an old python-webcolor. Remove this
+ ;; when python-team branch is merged.
+ (delete 'sanity-check)
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Interferes with test expectations.
+ (unsetenv "JUPYTER_CONFIG_PATH")
+ ;; Some tests do not expect all files to be installed in the
+ ;; same directory, but JUPYTER_PATH contains multiple entries.
+ (unsetenv "JUPYTER_PATH"))))))
+ (propagated-inputs
+ (list python-argon2-cffi
+ python-ipykernel
+ python-ipython-genutils
+ python-jinja2
+ python-jupyter-client
+ python-jupyter-core
+ python-nest-asyncio
+ python-nbclassic
+ python-nbconvert
+ python-nbformat
+ python-prometheus-client
+ python-pyzmq
+ python-send2trash
+ python-terminado
+ python-tornado-6
+ python-traitlets))
+ (native-inputs
+ (list python-coverage
+ python-jupyter-server
+ python-nbval
+ python-pytest
+ python-pytest-cov
+ python-requests
+ python-requests-unixsocket2
+ python-setuptools
+ python-wheel))
+ (home-page "https://jupyter.org/")
+ (synopsis "Web-based notebook environment for interactive computing")
+ (description
+ "The Jupyter HTML notebook is a web-based notebook environment for
+interactive computing.")
+ (license license:bsd-3)))
+
(define-public python-notebook-shim
(package
(name "python-notebook-shim")
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 666de1bcd7..a2aa6fb7b5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19328,91 +19328,6 @@ convert an @code{.ipynb} notebook file into various static formats including:
@end enumerate\n")
(license license:bsd-3)))
-(define-public python-notebook
- (package
- (name "python-notebook")
- (version "6.5.7")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "notebook" version))
- (sha256
- (base32
- "1r38fwr0r4xgkz8y27w3xyz2dk97ih5azba28jylyqxcvw8r1sq4"))))
- (build-system pyproject-build-system)
- (arguments
- (list
- #:test-flags
- '(list "-k" (string-append
- ;; TODO: This tests fails because nbconvert does not
- ;; list "python" as a format.
- "not test_list_formats"
- ;; AssertionError: Lists differ:
- " and not test_disable"
- " and not test_enable"
- " and not test_merge_config"
- " and not test_load_ordered"
- " and not test_list_running_sock_servers"
- " and not test_run")
- ;; These tests require a browser.
- "--ignore=notebook/tests/selenium")
- #:phases
- '(modify-phases %standard-phases
- (add-after 'unpack 'use-our-home-for-tests
- (lambda _
- ;; The 'get_patch_env' function in this file reads:
- ;; 'HOME': cls.home_dir
- ;; but for some reason, that definition of HOME is not what the
- ;; GLib/GIO trash mechanism honors, which would cause test
- ;; failures. Instead, set 'HOME' here to an existing directory
- ;; and let the tests honor it.
- (substitute* "notebook/tests/launchnotebook.py"
- (("'HOME': .*," all)
- (string-append "# " all "\n")))
- (setenv "HOME" (getcwd))))
- ;; Because python-jsonschema has an old python-webcolor. Remove this
- ;; when python-team branch is merged.
- (delete 'sanity-check)
- (add-before 'check 'pre-check
- (lambda _
- ;; Interferes with test expectations.
- (unsetenv "JUPYTER_CONFIG_PATH")
- ;; Some tests do not expect all files to be installed in the
- ;; same directory, but JUPYTER_PATH contains multiple entries.
- (unsetenv "JUPYTER_PATH"))))))
- (propagated-inputs
- (list python-argon2-cffi
- python-ipykernel
- python-ipython-genutils
- python-jinja2
- python-jupyter-client
- python-jupyter-core
- python-nest-asyncio
- python-nbclassic
- python-nbconvert
- python-nbformat
- python-prometheus-client
- python-pyzmq
- python-send2trash
- python-terminado
- python-tornado-6
- python-traitlets))
- (native-inputs
- (list python-coverage
- python-jupyter-server
- python-nbval
- python-pytest
- python-pytest-cov
- python-requests
- python-requests-unixsocket2
- python-setuptools
- python-wheel))
- (home-page "https://jupyter.org/")
- (synopsis "Web-based notebook environment for interactive computing")
- (description
- "The Jupyter HTML notebook is a web-based notebook environment for
-interactive computing.")
- (license license:bsd-3)))
-
(define-public python-widgetsnbextension
(package
(name "python-widgetsnbextension")
diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm
index 6fc453c8d5..ee8fea3357 100644
--- a/gnu/packages/sagemath.scm
+++ b/gnu/packages/sagemath.scm
@@ -41,6 +41,7 @@
#:use-module (gnu packages gd)
#:use-module (gnu packages graph)
#:use-module (gnu packages image)
+ #:use-module (gnu packages jupyter)
#:use-module (gnu packages lisp)
#:use-module (gnu packages m4)
#:use-module (gnu packages maths)