sharlatan pushed a commit to branch ruby-team
in repository guix.

commit 98b79d26fafa0d00921f26bc0f28357aa7f54ef5
Author: Nicolas Graves <[email protected]>
AuthorDate: Tue Mar 4 12:54:13 2025 +0100

    gnu: python-numpy-documentation: Update python-sphinx native-input.
    
    * gnu/packages/python-xyz.scm (python-numpy-documentation):
    [arguments]{phases}: Add phase 'avoid-external-deps. Adapt phase
    'install by removing sphinx.ext.autodoc extension.
    [native-inputs]: Replace python-sphinx-4 by python-sphinx. Add
    python-sphinx-design.
    
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/python-xyz.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c5df2dd962..5252587e8d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9653,6 +9653,16 @@ include_dirs = ~:*~a/include~%" #$(this-package-input 
"openblas")))))))))
       #:tests? #f                     ;we're only generating the documentation
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'avoid-external-deps
+            (lambda _
+              ;; XXX: Avoid theme-switcher to avoid sphinx error
+              ;; TemplateNotFound('theme-switcher.html')
+              ;; XXX: Avoid version-switcher because it depends on the value
+              ;; of external https://numpy.org/doc/_static/versions.json
+              (substitute* "doc/source/conf.py"
+                (("\
+\"navbar_end\": \\[\"theme-switcher\", \"version-switcher\", ")
+                 "\"navbar_end\": ["))))
           (add-before 'build 'add-gnu-freefont-to-texmf
             (lambda _
               ;; XXX: The Sphinx-generated tex output specifies the GNU
@@ -9698,6 +9708,7 @@ include_dirs = ~:*~a/include~%" #$(this-package-input 
"openblas")))))))))
                     (("\"contents\"") "'index'")
                     ;; Disable Sphinx extensions that produce broken Texinfo.
                     ((".*'numpydoc'.*") "")
+                    ((".*'sphinx.ext.autodoc'.*") "")
                     ((".*'sphinx.ext.autosummary'.*") ""))
                   (invoke "make" "info" sphinxopts)
                   ;; Install the HTML documentation.
@@ -9721,7 +9732,8 @@ include_dirs = ~:*~a/include~%" #$(this-package-input 
"openblas")))))))))
            python-pandas
            python-pydata-sphinx-theme
            python-scipy                 ;used by matplotlib
-           python-sphinx-4
+           python-sphinx
+           python-sphinx-design
            python-sphinx-panels
            texinfo
            (texlive-updmap.cfg

Reply via email to