mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-jupyter-core: Update to 5.7.2.
* gnu/packages/python-xyz.scm (python-jupyter-core): Update to 5.7.2. [native-inputs]: Add python-hatchling, python-pre-commit, python-pytest-cov, and python-pytest-timeout. [propagated-inputs]: Add python-platformdirs. [build-system]: Use pyproject-build-system. [arguments]: Use #:test-flags instead of custom 'check phase; remove phase 'patch-testsuite; disable a few tests; add phase 'pre-check. Change-Id: I5f415688d17de1c6b4581a0b339359f7efee68c5
This commit is contained in:
parent
69d1d74c9d
commit
a318906821
1 changed files with 34 additions and 31 deletions
|
@ -12710,39 +12710,38 @@ container data structures in Python).")
|
||||||
(define-public python-jupyter-core
|
(define-public python-jupyter-core
|
||||||
(package
|
(package
|
||||||
(name "python-jupyter-core")
|
(name "python-jupyter-core")
|
||||||
(version "4.10.0")
|
(version "5.7.2")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append (pypi-uri "jupyter_core" version)))
|
(uri (string-append (pypi-uri "jupyter_core" version)))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1v0s31rmwppdmww135hif03hy164j9kimirh24kxfcbvdfql9pm6"))))
|
"1n9nyp1skljbbkqp4j7mnihnyp83j9rxm5h4hfn33d7npcr8spxa"))))
|
||||||
(build-system python-build-system)
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
(list
|
||||||
(modify-phases %standard-phases
|
#:test-flags
|
||||||
(replace 'check
|
'(list "-k"
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(string-append
|
||||||
(when tests?
|
;; XXX: These tests fail with "ModuleNotFoundError: No
|
||||||
;; Some tests write to $HOME.
|
;; module named 'jupyter_core'".
|
||||||
(setenv "HOME" "/tmp")
|
"not test_argv0"
|
||||||
(invoke "pytest" "-vv"
|
" and not test_path_priority "
|
||||||
"-k"
|
" and not test_not_on_path"
|
||||||
(string-append
|
|
||||||
;; XXX: These tests fail with "ModuleNotFoundError: No
|
;; These fail with: An incompatible sibling of 'AsyncTornadoApp'
|
||||||
;; module named 'jupyter_core'".
|
;; is already instantiated as singleton: SyncTornadoApp
|
||||||
"not test_argv0 and not test_path_priority "
|
" and not test_async_app"
|
||||||
"and not test_not_on_path")))))
|
" and not test_async_tornado_app"
|
||||||
(add-after 'unpack 'patch-testsuite
|
|
||||||
(lambda _
|
;; Fails with a deprecation warning
|
||||||
;; test_not_on_path() and test_path_priority() try to run a test
|
" and not test_sync_tornado_run"))
|
||||||
;; that loads jupyter_core, so we need GUIX_PYTHONPATH
|
#:phases
|
||||||
(substitute* "jupyter_core/tests/test_command.py"
|
'(modify-phases %standard-phases
|
||||||
(("env = \\{'PATH': ''\\}")
|
(add-before 'check 'pre-check
|
||||||
"env = {'PATH': '', 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}")
|
;; Some tests write to $HOME.
|
||||||
(("env = \\{'PATH': str\\(b\\)\\}")
|
(lambda _ (setenv "HOME" "/tmp")))
|
||||||
"env = {'PATH': str(b), 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}"))))
|
|
||||||
;; Migration is running whenever etc/jupyter exists, but the
|
;; Migration is running whenever etc/jupyter exists, but the
|
||||||
;; Guix-managed directory will never contain any migratable IPython
|
;; Guix-managed directory will never contain any migratable IPython
|
||||||
;; config files and cannot be written to anyway, so just pretend we
|
;; config files and cannot be written to anyway, so just pretend we
|
||||||
|
@ -12751,11 +12750,15 @@ container data structures in Python).")
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(mkdir-p (string-append (assoc-ref outputs "out") "/etc/jupyter"))
|
(mkdir-p (string-append (assoc-ref outputs "out") "/etc/jupyter"))
|
||||||
(invoke "touch"
|
(invoke "touch"
|
||||||
(string-append
|
(string-append
|
||||||
(assoc-ref outputs "out")
|
(assoc-ref outputs "out")
|
||||||
"/etc/jupyter/migrated")))))))
|
"/etc/jupyter/migrated")))))))
|
||||||
(propagated-inputs (list python-traitlets))
|
(propagated-inputs (list python-platformdirs python-traitlets))
|
||||||
(native-inputs (list python-pytest))
|
(native-inputs (list python-hatchling
|
||||||
|
python-pre-commit
|
||||||
|
python-pytest
|
||||||
|
python-pytest-cov
|
||||||
|
python-pytest-timeout))
|
||||||
;; This package provides the `jupyter` binary and thus also exports the
|
;; This package provides the `jupyter` binary and thus also exports the
|
||||||
;; search paths.
|
;; search paths.
|
||||||
(native-search-paths
|
(native-search-paths
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue