From 1d0ac19d81ecdd1b21048d3dfe1c06323ff9c351 Mon Sep 17 00:00:00 2001 From: Hugo Buddelmeijer Date: Tue, 6 Jan 2026 19:38:27 +0100 Subject: [PATCH] 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 --- gnu/packages/sphinx.scm | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm index 3f9d72f4964d5de8d60c5ad8c48d604cb690d50d..f58c667f4e3985135c58b71997593f3d9f92b60e 100644 --- a/gnu/packages/sphinx.scm +++ b/gnu/packages/sphinx.scm @@ -1395,12 +1395,26 @@ executed during the Sphinx build process.") (add-after 'unpack 'ignore-warnings (lambda _ (substitute* "pyproject.toml" - (("\"error\",") ""))))))) + (("\"error\",") "")))) + (add-after 'unpack 'fix-tests + ;; See: + ;; 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 - (list python-ipython python-ipywidgets python-nbconvert + (list python-ipython + python-ipywidgets + python-nbconvert python-nbformat)) (native-inputs - (list python-hatchling + (list python-bash-kernel ;for tests + python-hatchling python-ipykernel python-pytest python-sphinx))