gnu: python-matplotlib-documentation: Fix build.
* gnu/packages/python-xyz.scm (python-matplotlib-documentation) [native-inputs]: Add python-ipykernel; replace texlive with a texlive-union consisting of texlive-latex-amsfonts, texlive-latex-amsmath, texlive-latex-enumitem, texlive-latex-expdlist, texlive-latex-preview, texlive-latex-type1cm, texlive-latex-ucs, texlive-generic-pdftex, texlive-fonts-amsfonts, texlive-fonts-ec, texlive-fonts-adobe-times, and texlive-fonts-txfonts. [arguments]: Do not build PDF, remove PDF-related changes; patch to avoid dependency on network resources.
This commit is contained in:
parent
b6fd7f5003
commit
e7a53914f1
|
@ -3537,9 +3537,24 @@ toolkits.")
|
||||||
("python-sphinx-gallery" ,python-sphinx-gallery)
|
("python-sphinx-gallery" ,python-sphinx-gallery)
|
||||||
("python-numpydoc" ,python-numpydoc)
|
("python-numpydoc" ,python-numpydoc)
|
||||||
("python-ipython" ,python-ipython)
|
("python-ipython" ,python-ipython)
|
||||||
|
("python-ipykernel" ,python-ipykernel)
|
||||||
("python-mock" ,python-mock)
|
("python-mock" ,python-mock)
|
||||||
("graphviz" ,graphviz)
|
("graphviz" ,graphviz)
|
||||||
("texlive" ,texlive)
|
("texlive" ,(texlive-union (list texlive-latex-amsfonts
|
||||||
|
texlive-latex-amsmath
|
||||||
|
texlive-latex-enumitem
|
||||||
|
texlive-latex-expdlist
|
||||||
|
texlive-latex-geometry
|
||||||
|
texlive-latex-preview
|
||||||
|
texlive-latex-type1cm
|
||||||
|
texlive-latex-ucs
|
||||||
|
|
||||||
|
texlive-generic-pdftex
|
||||||
|
|
||||||
|
texlive-fonts-amsfonts
|
||||||
|
texlive-fonts-ec
|
||||||
|
texlive-fonts-adobe-times
|
||||||
|
texlive-fonts-txfonts)))
|
||||||
("texinfo" ,texinfo)
|
("texinfo" ,texinfo)
|
||||||
,@(package-native-inputs python-matplotlib)))
|
,@(package-native-inputs python-matplotlib)))
|
||||||
(arguments
|
(arguments
|
||||||
|
@ -3549,15 +3564,24 @@ toolkits.")
|
||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda _
|
(lambda _
|
||||||
(chdir "doc")
|
(chdir "doc")
|
||||||
;; Produce pdf in 'A4' format.
|
(setenv "PYTHONPATH"
|
||||||
|
(string-append (getenv "PYTHONPATH")
|
||||||
|
":" (getcwd) "/../examples/units"))
|
||||||
(substitute* "conf.py"
|
(substitute* "conf.py"
|
||||||
(("latex_paper_size = 'letter'") "")
|
;; Don't use git.
|
||||||
;; latex_paper_size is deprecated -> set paper size using
|
(("^SHA = check_output.*")
|
||||||
;; latex_elements
|
(string-append "SHA = \"" ,version "\"\n"))
|
||||||
(("latex_elements\\['pointsize'\\] = '11pt'" match)
|
;; Don't fetch intersphinx files from the Internet
|
||||||
;; insert at a point where latex_elements{} is defined:
|
(("^explicit_order_folders" m)
|
||||||
(string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
|
(string-append "intersphinx_mapping = {}\n" m))
|
||||||
(invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
|
(("'sphinx.ext.intersphinx',") "")
|
||||||
|
;; Disable URL embedding which requires internet access.
|
||||||
|
(("'https://docs.scipy.org/doc/numpy'") "None")
|
||||||
|
(("'https://docs.scipy.org/doc/scipy/reference'") "None"))
|
||||||
|
(invoke "make"
|
||||||
|
"SPHINXBUILD=sphinx-build"
|
||||||
|
"SPHINXOPTS=" ; don't abort on warnings
|
||||||
|
"html" "texinfo")))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let* ((data (string-append (assoc-ref outputs "out") "/share"))
|
(let* ((data (string-append (assoc-ref outputs "out") "/share"))
|
||||||
|
@ -3575,12 +3599,9 @@ toolkits.")
|
||||||
(string-append "@image{matplotlib-figures/" file)))
|
(string-append "@image{matplotlib-figures/" file)))
|
||||||
(symlink (string-append html "/_images")
|
(symlink (string-append html "/_images")
|
||||||
"./matplotlib-figures")
|
"./matplotlib-figures")
|
||||||
(system* "makeinfo" "--no-split"
|
(invoke "makeinfo" "--no-split"
|
||||||
"-o" "matplotlib.info" "matplotlib.texi"))
|
"-o" "matplotlib.info" "matplotlib.texi"))
|
||||||
(copy-file "build/texinfo/matplotlib.info"
|
(install-file "build/texinfo/matplotlib.info" info))
|
||||||
(string-append info "/matplotlib.info"))
|
|
||||||
(copy-file "build/latex/Matplotlib.pdf"
|
|
||||||
(string-append doc "/Matplotlib.pdf")))
|
|
||||||
#t)))))
|
#t)))))
|
||||||
(home-page (package-home-page python-matplotlib))
|
(home-page (package-home-page python-matplotlib))
|
||||||
(synopsis "Documentation for the python-matplotlib package")
|
(synopsis "Documentation for the python-matplotlib package")
|
||||||
|
|
Loading…
Reference in New Issue