GNU bug report logs -
#26025
[PATCH] gnu: python-matplotlib-documentation: Fix build.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26025 in the body.
You can then email your comments to 26025 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#26025
; Package
guix-patches
.
(Wed, 08 Mar 2017 12:54:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Thomas Danckaert <post <at> thomasdanckaert.be>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 08 Mar 2017 12:54:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Guix,
I didn't notice that building html documentation for the updated
matplotlib package failed halfway. This patch fixes that, and
rewrites the build procedure in a way that should make the package
build fail on similar errors in the future.
Thomas
[0001-gnu-python-matplotlib-documentation-Fix-build.patch (text/x-patch, inline)]
From c16cfc0ecaa41c5e974dc9ce480eed5c16759a9a Mon Sep 17 00:00:00 2001
From: Thomas Danckaert <post <at> thomasdanckaert.be>
Date: Tue, 7 Mar 2017 20:42:05 +0100
Subject: [PATCH] gnu: python-matplotlib-documentation: Fix build.
* gnu/packages/python.scm (python-matplotlib-documentation) [native-inputs]:
Add python-mock and graphviz.
[arguments]: Use separate build and install phases; correctly set latex paper size.
---
gnu/packages/python.scm | 61 +++++++++++++++++++++++++------------------------
1 file changed, 31 insertions(+), 30 deletions(-)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index a271ad46b..0b7804e0a 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3968,6 +3968,8 @@ toolkits.")
("python-sphinx" ,python-sphinx)
("python-numpydoc" ,python-numpydoc)
("python-ipython" ,python-ipython)
+ ("python-mock" ,python-mock)
+ ("graphviz" ,graphviz)
("texlive" ,texlive)
("texinfo" ,texinfo)
,@(package-native-inputs python-matplotlib)))
@@ -3975,42 +3977,41 @@ toolkits.")
`(#:tests? #f ; we're only generating documentation
#:phases
(modify-phases %standard-phases
- (delete 'build)
+ (replace 'build
+ (lambda _
+ (chdir "doc")
+ ;; Produce pdf in 'A4' format.
+ (substitute* "conf.py"
+ (("latex_paper_size = 'letter'") "")
+ ;; latex_paper_size is deprecated -> set paper size using
+ ;; latex_elements
+ (("latex_elements\\['pointsize'\\] = '11pt'" match)
+ ;; insert at a point where latex_elements{} is defined:
+ (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
+ (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
(replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((data (string-append (assoc-ref outputs "out") "/share"))
- (doc (string-append data "/doc/" ,name "-" ,version))
+ (doc (string-append data "/doc/python-matplotlib-" ,version))
(info (string-append data "/info"))
(html (string-append doc "/html")))
- ;; Make installed package available for building the
- ;; documentation
- (with-directory-excursion "doc"
- ;; Produce pdf in 'A4' format.
- (substitute* (find-files "." "conf\\.py")
- (("latex_paper_size = 'letter'")
- "latex_paper_size = 'a4'"))
- (mkdir-p html)
- (mkdir-p info)
- ;; The doc recommends to run the 'html' target twice.
- (system* "python" "make.py" "html")
- (system* "python" "make.py" "html")
- (copy-recursively "build/html" html)
- (system* "python" "make.py" "latex")
- (system* "python" "make.py" "texinfo")
+ (mkdir-p html)
+ (mkdir-p info)
+ (copy-recursively "build/html" html)
+ (symlink (string-append html "/_images")
+ (string-append info "/matplotlib-figures"))
+ (with-directory-excursion "build/texinfo"
+ (substitute* "matplotlib.texi"
+ (("@image\\{([^,]*)" all file)
+ (string-append "@image{matplotlib-figures/" file)))
(symlink (string-append html "/_images")
- (string-append info "/matplotlib-figures"))
- (with-directory-excursion "build/texinfo"
- (substitute* "matplotlib.texi"
- (("@image\\{([^,]*)" all file)
- (string-append "@image{matplotlib-figures/" file)))
- (symlink (string-append html "/_images")
- "./matplotlib-figures")
- (system* "makeinfo" "--no-split"
- "-o" "matplotlib.info" "matplotlib.texi"))
- (copy-file "build/texinfo/matplotlib.info"
- (string-append info "/matplotlib.info"))
- (copy-file "build/latex/Matplotlib.pdf"
- (string-append doc "/Matplotlib.pdf"))))
+ "./matplotlib-figures")
+ (system* "makeinfo" "--no-split"
+ "-o" "matplotlib.info" "matplotlib.texi"))
+ (copy-file "build/texinfo/matplotlib.info"
+ (string-append info "/matplotlib.info"))
+ (copy-file "build/latex/Matplotlib.pdf"
+ (string-append doc "/Matplotlib.pdf")))
#t)))))
(home-page (package-home-page python-matplotlib))
(synopsis "Documentation for the python-matplotlib package")
--
2.11.1
Reply sent
to
Marius Bakke <mbakke <at> fastmail.com>
:
You have taken responsibility.
(Wed, 08 Mar 2017 17:32:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Thomas Danckaert <post <at> thomasdanckaert.be>
:
bug acknowledged by developer.
(Wed, 08 Mar 2017 17:32:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 26025-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thomas Danckaert <post <at> thomasdanckaert.be> writes:
> Hi Guix,
>
> I didn't notice that building html documentation for the updated
> matplotlib package failed halfway. This patch fixes that, and
> rewrites the build procedure in a way that should make the package
> build fail on similar errors in the future.
Pushed, thanks!
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 06 Apr 2017 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 133 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.