[PATCH] gnu: music21: Patch executables and add missing dependencies.

  • Open
  • quality assurance status badge
Details
3 participants
  • jgart
  • Maxim Cournoyer
  • Maxime Devos
Owner
unassigned
Submitted by
jgart
Severity
normal

Debbugs page

J
(address . guix-patches@gnu.org)(name . jgart)(address . jgart@dismail.de)
20220326011233.25118-1-jgart@dismail.de
* gnu/packages/music.scm (music21)[arguments]: Patch executables.
[propagated-inputs]: Add python-matplotlib, python-jsonpickle, and
python-numpy.
[inputs]: Add lilypond, musescore, and xdg-utils.
---
gnu/packages/music.scm | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)

Toggle diff (42 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 9c8203aa80..2c6b530aac 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -1531,6 +1531,15 @@ (define-public music21
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-before 'build 'patch-executables
+ (lambda _
+ (substitute* '("music21/environment.py"
+ "music21/lily/translate.py")
+ (("/usr/bin/lilypond") (which "lilypond"))
+ (("/usr/bin/mscore3") (which "mscore"))
+ (("/usr/bin/xdg-open") (which "xdg-open"))
+ (("LILYEXEC = 'lilypond'")
+ (string-append "LILYEXEC = '" (which "lilypond") "'")))))
(replace 'check
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
(when tests?
@@ -1538,8 +1547,17 @@ (define-public music21
;; See: https://github.com/cuthbertLab/music21/issues/1164
(invoke "python" "-m" "music21.stream.tests")))))))
(propagated-inputs
- (list python-chardet python-joblib python-more-itertools
- python-webcolors))
+ (list python-chardet
+ python-joblib
+ python-matplotlib
+ python-jsonpickle
+ python-more-itertools
+ python-webcolors
+ python-numpy))
+ (inputs
+ (list lilypond
+ musescore
+ xdg-utils))
(home-page "https://web.mit.edu/music21/")
(synopsis "Toolkit for Computational Musicology")
(description
--
2.34.0
M
M
Maxime Devos wrote on 26 Mar 2022 02:33
8e31fbf5d80be819bf5336aa99617771e7d4aaf3.camel@telenet.be
jgart via Guix-patches via schreef op vr 25-03-2022 om 21:12 [-0400]:
Toggle quote (11 lines)
> +               (("/usr/bin/lilypond") (which "lilypond"))
> +               (("/usr/bin/mscore3") (which "mscore"))
> +               (("/usr/bin/xdg-open") (which "xdg-open"))
> +               (("LILYEXEC = 'lilypond'")
> +                (string-append "LILYEXEC = '" (which "lilypond") "'")))))
> [...]
> + (inputs
> + (list lilypond
> + musescore
> + xdg-utils))

'which' looks in native-inputs, not the 'inputs', so this is probably
incorrect when cross-compiling. I suggest using (search-input-file
inputs "/bin/lilypond") instead.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYj7d4hccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7mCbAQD8a2yvKTh9wxt/vxcqAPdfqnkT
wCXde/2kUkrxC6q8cAEAnpa+42UvL4wNG1X5I9YusbsiHM2PnnthC8rXkQNPhws=
=MFZW
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 26 Mar 2022 02:34
028eabf5caec005322cab1f387bbc3174952c44b.camel@telenet.be
jgart via Guix-patches via schreef op vr 25-03-2022 om 21:12 [-0400]:
Toggle quote (11 lines)
>      (propagated-inputs
> -      (list python-chardet python-joblib python-more-itertools
> -            python-webcolors))
> +      (list python-chardet
> +            python-joblib
> +            python-matplotlib
> +            python-jsonpickle
> +            python-more-itertools
> +            python-webcolors
> +            python-numpy))

It is a tool, and not (only?) a library, so do these need to be
propagated, or would some wrapping suffice?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYj7eNhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7o4QAP9xkwUmtqGkw/ZI5Yi7NwLFGT92
GkqKqTTE8HEwQnTeQgD/YrxklFCUeLO+PkAFZ5P9t39U3thoRjRV5KktGxVD2ws=
=Ul7E
-----END PGP SIGNATURE-----


M
M
Maxim Cournoyer wrote on 7 Jul 2022 13:23
control message for bug #54571
(address . control@debbugs.gnu.org)
87tu7swu2l.fsf@gmail.com
tags 54571 + moreinfo
quit
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 54571@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 54571
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch