~ruther/guix-local

1d0ac19d81ecdd1b21048d3dfe1c06323ff9c351 — Hugo Buddelmeijer a month ago ad5059c
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>
1 files changed, 17 insertions(+), 3 deletions(-)

M gnu/packages/sphinx.scm
M gnu/packages/sphinx.scm => gnu/packages/sphinx.scm +17 -3
@@ 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: <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
     (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))