mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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
This commit is contained in:
parent
84527ea254
commit
aa52e30c41
1 changed files with 41 additions and 38 deletions
|
@ -10748,47 +10748,50 @@ numpysane has:
|
||||||
"texmf-dist/fonts/opentype/public/gnu-freefont"))
|
"texmf-dist/fonts/opentype/public/gnu-freefont"))
|
||||||
(setenv "GUIX_TEXMF" (string-append (getenv "GUIX_TEXMF") ":"
|
(setenv "GUIX_TEXMF" (string-append (getenv "GUIX_TEXMF") ":"
|
||||||
(getcwd) "/texmf-dist"))))
|
(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
|
(replace 'install
|
||||||
(lambda _
|
(lambda _
|
||||||
(let* ((data (string-append #$output "/share"))
|
(let* ((data (string-append #$output "/share"))
|
||||||
(doc (string-append data "/doc/numpy"))
|
(doc (string-append data "/doc/numpy"))
|
||||||
(html (string-append doc "/html"))
|
(html (string-append doc "/html"))
|
||||||
(info (string-append data "/info"))
|
(info (string-append data "/info")))
|
||||||
(sphinxopts (string-append
|
;; Install the HTML documentation.
|
||||||
"SPHINXOPTS=-j"
|
(mkdir-p html)
|
||||||
(number->string (parallel-job-count)))))
|
(copy-recursively "build/html" html)
|
||||||
(with-directory-excursion "doc"
|
;; Install the PDF reference and user manuals.
|
||||||
;; Do not treat warnings as errors.
|
;; FIXME:
|
||||||
(substitute* "Makefile"
|
;; (install-file "build/latex/numpy-ref.pdf" doc)
|
||||||
((" -WT ") " -T "))
|
;; (install-file "build/latex/numpy-user.pdf" doc)
|
||||||
(setenv "HOME" "/tmp")
|
;; Install the info manual.
|
||||||
;; Build the PDF documentation.
|
(install-file "build/texinfo/numpy.info" info)
|
||||||
(invoke "make" "latex-build" sphinxopts)
|
(symlink (string-append html "/_images")
|
||||||
(invoke "make" "-C" "build/latex" "all-pdf" sphinxopts)
|
(string-append info "/numpy-figures"))))))))
|
||||||
;; 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")))))))))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list font-gnu-freefont
|
(list font-gnu-freefont
|
||||||
perl
|
perl
|
||||||
|
@ -10802,11 +10805,11 @@ numpysane has:
|
||||||
python-scipy ;used by matplotlib
|
python-scipy ;used by matplotlib
|
||||||
python-sphinx
|
python-sphinx
|
||||||
python-sphinx-design
|
python-sphinx-design
|
||||||
python-sphinx-panels
|
|
||||||
texinfo
|
texinfo
|
||||||
(texlive-local-tree
|
(texlive-local-tree
|
||||||
(list texlive-cbfonts
|
(list texlive-cbfonts
|
||||||
texlive-cm-super
|
texlive-cm-super
|
||||||
|
texlive-cmap
|
||||||
texlive-expdlist
|
texlive-expdlist
|
||||||
texlive-fandol
|
texlive-fandol
|
||||||
texlive-greek-fontenc
|
texlive-greek-fontenc
|
||||||
|
@ -10818,7 +10821,7 @@ numpysane has:
|
||||||
(propagated-inputs '())
|
(propagated-inputs '())
|
||||||
(synopsis "Documentation for the @code{python-numpy} package")
|
(synopsis "Documentation for the @code{python-numpy} package")
|
||||||
(description "This package provides the complete NumPy documentation in
|
(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
|
(define-public python-numpy-stl
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue