From adb2e900012cf03a29423a047e71a2b1005a04a0 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Tue, 16 Dec 2025 09:36:10 +0000 Subject: [PATCH] gnu: python-jupyter-core: Move to jupyter. * gnu/packages/python-xyz.scm (python-jupyter-core): Move from here ... * gnu/packages/jupyter.scm: ... to here. Change-Id: Id577b47b0a6c9a8754e6dc4f07e5ac8ba4ea106d Signed-off-by: Rutherther --- gnu/packages/jupyter.scm | 65 ++++++++++++++++++++++++++++++++++++ gnu/packages/python-xyz.scm | 66 ------------------------------------- 2 files changed, 65 insertions(+), 66 deletions(-) diff --git a/gnu/packages/jupyter.scm b/gnu/packages/jupyter.scm index 35521805961292aadb3663e851e4968a491b576e..fc9880d1c2e5786b38aee401884edae6572988e2 100644 --- a/gnu/packages/jupyter.scm +++ b/gnu/packages/jupyter.scm @@ -430,6 +430,71 @@ interactive computing.") to Jupyter Server for their Python Web application backend.") (license license:bsd-3))) +(define-public python-jupyter-core + (package + (name "python-jupyter-core") + (version "5.7.2") + (source + (origin + (method url-fetch) + (uri (string-append (pypi-uri "jupyter_core" version))) + (sha256 + (base32 "1n9nyp1skljbbkqp4j7mnihnyp83j9rxm5h4hfn33d7npcr8spxa")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "-k" (string-join + ;; XXX: These tests fail with "ModuleNotFoundError: No + ;; module named 'jupyter_core'". + (list "not test_argv0" + "test_path_priority " + "test_not_on_path" + ;; These fail with: An incompatible sibling of + ;; 'AsyncTornadoApp' is already instantiated as + ;; singleton: SyncTornadoApp + "test_async_app" + "test_async_tornado_app" + ;; Fails with a deprecation warning + "test_sync_tornado_run" + ;; Expecting pip in the PATH. + "test_troubleshoot") + " and not ")) + #:phases + #~(modify-phases %standard-phases + ;; Migration is running whenever etc/jupyter exists, but the + ;; Guix-managed directory will never contain any migratable IPython + ;; config files and cannot be written to anyway, so just pretend we + ;; already did that. + (add-after 'install 'disable-migration + (lambda _ + (mkdir-p (string-append #$output "/etc/jupyter")) + (invoke "touch" (string-append #$output "/etc/jupyter/migrated")))) + (add-before 'check 'pre-check + (lambda _ + (setenv "HOME" "/tmp")))))) + (native-inputs + (list python-hatchling + python-pytest + python-pytest-timeout)) + (propagated-inputs + (list python-platformdirs + python-traitlets)) + ;; This package provides the `jupyter` binary and thus also exports the + ;; search paths. + (native-search-paths + (list (search-path-specification + (variable "JUPYTER_CONFIG_PATH") + (files '("etc/jupyter"))) + (search-path-specification + (variable "JUPYTER_PATH") + (files '("share/jupyter"))))) + (home-page "https://jupyter.org/") + (synopsis "Jupyter base package") + (description + "Jupyter core is the base package on which Jupyter projects rely.") + (license license:bsd-3))) + (define-public python-jupyter-lsp (package (name "python-jupyter-lsp") diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index ea7f2833872c83ee40aef24e63455d2bbbda20f4..5ccbe5294ba565e7ba79b18644adbe5c25b54c43 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -14812,72 +14812,6 @@ connect strings, then issue SQL commands within IPython or IPython Notebook.") container data structures in Python).") (license license:asl2.0))) -(define-public python-jupyter-core - (package - (name "python-jupyter-core") - (version "5.7.2") - (source - (origin - (method url-fetch) - (uri (string-append (pypi-uri "jupyter_core" version))) - (sha256 - (base32 - "1n9nyp1skljbbkqp4j7mnihnyp83j9rxm5h4hfn33d7npcr8spxa")))) - (build-system pyproject-build-system) - (arguments - (list - #:test-flags - #~(list "-k" (string-join - ;; XXX: These tests fail with "ModuleNotFoundError: No - ;; module named 'jupyter_core'". - (list "not test_argv0" - "test_path_priority " - "test_not_on_path" - ;; These fail with: An incompatible sibling of - ;; 'AsyncTornadoApp' is already instantiated as - ;; singleton: SyncTornadoApp - "test_async_app" - "test_async_tornado_app" - ;; Fails with a deprecation warning - "test_sync_tornado_run" - ;; Expecting pip in the PATH. - "test_troubleshoot") - " and not ")) - #:phases - #~(modify-phases %standard-phases - ;; Some tests write to $HOME. - (add-before 'check 'pre-check - (lambda _ (setenv "HOME" "/tmp"))) - ;; Migration is running whenever etc/jupyter exists, but the - ;; Guix-managed directory will never contain any migratable IPython - ;; config files and cannot be written to anyway, so just pretend we - ;; already did that. - (add-after 'install 'disable-migration - (lambda _ - (mkdir-p (string-append #$output "/etc/jupyter")) - (invoke "touch" (string-append #$output "/etc/jupyter/migrated"))))))) - (native-inputs - (list python-hatchling - python-pytest - python-pytest-timeout)) - (propagated-inputs - (list python-platformdirs - python-traitlets)) - ;; This package provides the `jupyter` binary and thus also exports the - ;; search paths. - (native-search-paths - (list (search-path-specification - (variable "JUPYTER_CONFIG_PATH") - (files '("etc/jupyter"))) - (search-path-specification - (variable "JUPYTER_PATH") - (files '("share/jupyter"))))) - (home-page "https://jupyter.org/") - (synopsis "Jupyter base package") - (description - "Jupyter core is the base package on which Jupyter projects rely.") - (license license:bsd-3))) - ;; Bootstrap variant of jupyter-client, which breaks the loop between ipykernel ;; and jupyter-client by removing the former from its native-inputs and ;; disabling tests.