guix_mirror_bot pushed a commit to branch python-team in repository guix. commit ae341651fcccc7a8775a45d84e4ab497a20bdaa6 Author: Sharlatan Hellseher <sharlata...@gmail.com> AuthorDate: Fri Jul 11 10:56:10 2025 +0100
gnu: python-numpy-documentation: Fix build. * gnu/packages/python-xyz.scm (python-numpy-documentation): [arguments] <phases>: Do not delete 'build, extract all build steps from 'install; PDF build fails and excluded for now. [native-inputs]: Remove python-sphinx-panels; {texlive-local-tree}: add texlive-cmap. [description]: Remove mention of PDF. Change-Id: I5f154ec681b127fd4c74667ec097a6409eacf099 --- gnu/packages/python-xyz.scm | 79 +++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index fcfc441db0..917550bee9 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -10521,47 +10521,50 @@ numpysane has: "texmf-dist/fonts/opentype/public/gnu-freefont")) (setenv "GUIX_TEXMF" (string-append (getenv "GUIX_TEXMF") ":" (getcwd) "/texmf-dist")))) - (delete 'build) + (replace 'build + (lambda _ + (chdir "doc") + (let ((sphinxopts (string-append + "SPHINXOPTS=-j" + (number->string (parallel-job-count))))) + ;; Do not treat warnings as errors. + (substitute* "Makefile" + ((" -WT ") " -T ")) + (setenv "HOME" "/tmp") + ;; Build the PDF documentation. + (invoke "make" "latex-build" sphinxopts) + ;; FIXME: PDF build fails + ;; (invoke "make" "-C" "build/latex" "all-pdf" sphinxopts) + ;; Build the HTML documentation + (invoke "make" "html" sphinxopts) + ;; Build the Info documentation. The issues worked around + ;; below can be tracked at + ;; https://github.com/numpy/numpy/issues/12278. + (substitute* "source/conf.py" + ;; The root document should be "index", not "contents". + (("\"contents\"") "'index'") + ;; Disable Sphinx extensions that produce broken Texinfo. + ((".*'numpydoc'.*") "") + ((".*'sphinx.ext.autodoc'.*") "") + ((".*'sphinx.ext.autosummary'.*") "")) + (invoke "make" "info" sphinxopts)))) (replace 'install (lambda _ (let* ((data (string-append #$output "/share")) (doc (string-append data "/doc/numpy")) (html (string-append doc "/html")) - (info (string-append data "/info")) - (sphinxopts (string-append - "SPHINXOPTS=-j" - (number->string (parallel-job-count))))) - (with-directory-excursion "doc" - ;; Do not treat warnings as errors. - (substitute* "Makefile" - ((" -WT ") " -T ")) - (setenv "HOME" "/tmp") - ;; Build the PDF documentation. - (invoke "make" "latex-build" sphinxopts) - (invoke "make" "-C" "build/latex" "all-pdf" sphinxopts) - ;; Build the HTML documentation - (invoke "make" "html" sphinxopts) - ;; Build the Info documentation. The issues worked around - ;; below can be tracked at - ;; https://github.com/numpy/numpy/issues/12278. - (substitute* "source/conf.py" - ;; The root document should be "index", not "contents". - (("\"contents\"") "'index'") - ;; Disable Sphinx extensions that produce broken Texinfo. - ((".*'numpydoc'.*") "") - ((".*'sphinx.ext.autodoc'.*") "") - ((".*'sphinx.ext.autosummary'.*") "")) - (invoke "make" "info" sphinxopts) - ;; Install the HTML documentation. - (mkdir-p html) - (copy-recursively "build/html" html) - ;; Install the PDF reference and user manuals. - (install-file "build/latex/numpy-ref.pdf" doc) - (install-file "build/latex/numpy-user.pdf" doc) - ;; Install the info manual. - (install-file "build/texinfo/numpy.info" info) - (symlink (string-append html "/_images") - (string-append info "/numpy-figures"))))))))) + (info (string-append data "/info"))) + ;; Install the HTML documentation. + (mkdir-p html) + (copy-recursively "build/html" html) + ;; Install the PDF reference and user manuals. + ;; FIXME: + ;; (install-file "build/latex/numpy-ref.pdf" doc) + ;; (install-file "build/latex/numpy-user.pdf" doc) + ;; Install the info manual. + (install-file "build/texinfo/numpy.info" info) + (symlink (string-append html "/_images") + (string-append info "/numpy-figures")))))))) (native-inputs (list font-gnu-freefont perl @@ -10575,11 +10578,11 @@ numpysane has: python-scipy ;used by matplotlib python-sphinx python-sphinx-design - python-sphinx-panels texinfo (texlive-local-tree (list texlive-cbfonts texlive-cm-super + texlive-cmap texlive-expdlist texlive-fandol texlive-greek-fontenc @@ -10591,7 +10594,7 @@ numpysane has: (propagated-inputs '()) (synopsis "Documentation for the @code{python-numpy} package") (description "This package provides the complete NumPy documentation in -the Texinfo, HTML, and PDF formats."))) +the Texinfo, and HTML formats."))) (define-public python-numpy-stl (package