gnu: python-jupyter-server: Update to 2.14.0.

* gnu/packages/jupyter.scm (python-jupyter-server): Update to 2.14.0.
[build-system]: Use pyproject-build-system.
[arguments]: Remove custom 'check phase; use #:test-flags instead; add
'ignore-deprecation-warnings phase; add 'pre-check phase.
[propagated-inputs]: Add python-jupyter-events,
python-jupyter-server-terminals, python-overrides, and python-packaging.
[native-inputs]: Remove python-coverage, python-pytest-cov,
python-pytest-mock, and python-pytest-tornasync; add python-flaky,
python-hatchling, python-hatch-jupyter-builder, python-pytest-jupyter, and
python-pytest-timeout.

Change-Id: Icebce3bc44b83bcd4cc60186b71d9161d13695da
This commit is contained in:
Ricardo Wurmus 2024-05-07 22:26:40 +02:00 committed by Sharlatan Hellseher
parent 3e9af5f208
commit 1ecb5b9076
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -514,45 +514,53 @@ JavaScript build steps.")
(define-public python-jupyter-server (define-public python-jupyter-server
(package (package
(name "python-jupyter-server") (name "python-jupyter-server")
(version "1.16.0") (version "2.14.0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "jupyter_server" version)) (uri (pypi-uri "jupyter_server" version))
(sha256 (sha256
(base32 (base32
"0fj6l34m6vk3yic87isz9bzgg4qsbr285x1faamf512bsrxghmn7")))) "0xz69anflhib514lgpdrs0ppmbwp13zbg4vwzls3820jlp7594b5"))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:test-flags
(replace 'check ;; Integration tests require a server.
(lambda* (#:key inputs outputs tests? #:allow-other-keys) '(list "-m" "not integration_test"
(when tests? ;; This test fails just like the shutil test in
(add-installed-pythonpath inputs outputs) ;; python-jupyter-events fails. Odd, that.
(let ((home (string-append (getcwd) "/guix-home"))) "-k" "not test_server_extension_list")
(setenv "HOME" home)) #:phases
;; Add jupyter-server executable to PATH. #~(modify-phases %standard-phases
(setenv "PATH" (add-after 'unpack 'ignore-deprecation-warnings
(string-append (assoc-ref outputs "out") "/bin:" (lambda _
(getenv "PATH"))) (substitute* "pyproject.toml"
(with-directory-excursion "jupyter_server" ((" \"ignore:datetime.*" m)
;; The pytest fixtures are only loaded when the file is (string-append m "\n\"ignore:zmq.eventloop.ioloop is deprecated:DeprecationWarning\","
;; called conftest.py. "\n\"ignore:There is no current event loop:DeprecationWarning\","
(rename-file "pytest_plugin.py" "conftest.py") "\n\"ignore:unclosed event loop:ResourceWarning\","
(invoke "pytest" "-vv" ;; From tornado
;; Fails with internal server error "\n\"ignore:unclosed <socket.socket:ResourceWarning\",")))))
"-k" "not test_list_formats" (add-before 'check 'pre-check
;; Integration tests require a server. (lambda _
"-m" "not integration_test")))))))) (let ((home (string-append (getcwd) "/guix-home")))
(setenv "HOME" home))
;; Add jupyter-server executable to PATH.
(setenv "PATH"
(string-append #$output "/bin:" (getenv "PATH"))))))))
(propagated-inputs (propagated-inputs
(list python-anyio (list python-anyio
python-argon2-cffi python-argon2-cffi
python-jinja2 python-jinja2
python-jupyter-client python-jupyter-client
python-jupyter-core python-jupyter-core
python-jupyter-events
python-jupyter-server-terminals
python-nbconvert python-nbconvert
python-nbformat python-nbformat
python-overrides
python-packaging
python-prometheus-client python-prometheus-client
python-pyzmq python-pyzmq
python-send2trash python-send2trash
@ -561,13 +569,14 @@ JavaScript build steps.")
python-traitlets python-traitlets
python-websocket-client)) python-websocket-client))
(native-inputs (native-inputs
(list python-coverage (list python-flaky
python-hatchling
python-hatch-jupyter-builder
python-ipykernel python-ipykernel
python-pytest python-pytest
python-pytest-console-scripts python-pytest-console-scripts
python-pytest-cov python-pytest-jupyter
python-pytest-mock python-pytest-timeout
python-pytest-tornasync
python-requests)) python-requests))
(home-page "https://jupyter.org") (home-page "https://jupyter.org")
(synopsis "Core services, APIs, and REST endpoints for Jupyter web applications") (synopsis "Core services, APIs, and REST endpoints for Jupyter web applications")