gnu: python-jupyter-sphinx: Fix build.

* gnu/packages/sphinx.scm (python-jupyter-sphinx): Fix build.
[arguments]<:#phases>: Add 'fix-tests and 'set-home phases.
[native-inputs]: Add python-bash-kernel.

Merges guix/guix!5422

Change-Id: I1c51a156f0be831793a417dab5efac84ee64a15c
Signed-off-by: Cayetano Santos <csantosb@inventati.org>
This commit is contained in:
Hugo Buddelmeijer 2026-01-06 19:38:27 +01:00 committed by Cayetano Santos
parent ad5059c951
commit 1d0ac19d81
No known key found for this signature in database
GPG key ID: BF5CDF4DF6BF6682

View file

@ -1395,12 +1395,26 @@ executed during the Sphinx build process.")
(add-after 'unpack 'ignore-warnings (add-after 'unpack 'ignore-warnings
(lambda _ (lambda _
(substitute* "pyproject.toml" (substitute* "pyproject.toml"
(("\"error\",") ""))))))) (("\"error\",") ""))))
(add-after 'unpack 'fix-tests
;; See: <https://github.com/jupyter/jupyter-sphinx/issues/280>
;; Tests are rewritten after 0.5.3, so undo when refreshing.
(lambda _
(substitute* "tests/test_execute.py"
(("python\\.tex") "projectnamenotset.tex"))))
(add-before 'check 'set-home
(lambda _
;; UserWarning: IPython parent '/homeless-shelter' is not
;; a writable location, using a temp directory.
(setenv "HOME" "/tmp"))))))
(propagated-inputs (propagated-inputs
(list python-ipython python-ipywidgets python-nbconvert (list python-ipython
python-ipywidgets
python-nbconvert
python-nbformat)) python-nbformat))
(native-inputs (native-inputs
(list python-hatchling (list python-bash-kernel ;for tests
python-hatchling
python-ipykernel python-ipykernel
python-pytest python-pytest
python-sphinx)) python-sphinx))