~ruther/guix-local

adb2e900012cf03a29423a047e71a2b1005a04a0 — Sharlatan Hellseher 3 months ago c699eb1
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 <rutherther@ditigal.xyz>
2 files changed, 65 insertions(+), 66 deletions(-)

M gnu/packages/jupyter.scm
M gnu/packages/python-xyz.scm
M gnu/packages/jupyter.scm => gnu/packages/jupyter.scm +65 -0
@@ 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")

M gnu/packages/python-xyz.scm => gnu/packages/python-xyz.scm +0 -66
@@ 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.