diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-07-11 10:56:10 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-08-08 16:50:03 +0100 |
commit | 44447f8ef2f93839cd241492ee60efd86708d829 (patch) | |
tree | 669308e2134fb33c8e8fc9a8f755fb4180d3f2e8 /gnu/packages/python-xyz.scm | |
parent | 5dc1c61282e6165ddf78b9bb2a2ba811e138c905 (diff) |
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
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r-- | gnu/packages/python-xyz.scm | 79 |
1 files changed, 41 insertions, 38 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index f730d313dd..6e35a2aebd 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -10761,47 +10761,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 @@ -10815,11 +10818,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 @@ -10831,7 +10834,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 |