]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4870: [midi2ly] Delay import of 'midi' module.
authorWerner Lemberg <wl@gnu.org>
Tue, 31 May 2016 11:37:03 +0000 (13:37 +0200)
committerWerner Lemberg <wl@gnu.org>
Tue, 31 May 2016 12:00:51 +0000 (14:00 +0200)
`make all` starts with generating the manual pages for lilypond's python
scripts using help2man.  However, at the time `midi2ly --help` gets called,
the 'midi' python module (which is based on code written in C) imported by
'midi2ly' has not been compiled yet, making help2man abort.

scripts/midi2ly.py

index f4a47fb79ab963c889a9d372b9952e89ac3cdbd9..5358fc46984ad6e8a49e363c2aaf622f816c18b9 100644 (file)
@@ -32,7 +32,6 @@ import sys
 @relocate-preamble@
 """
 
-import midi
 import lilylib as ly
 global _;_=ly._
 
@@ -923,6 +922,9 @@ class Staff:
         return dump_track (self.voices, i)
 
 def convert_midi (in_file, out_file):
+    global midi
+    import midi
+
     global clocks_per_1, clocks_per_4, key
     global start_quant_clocks
     global duration_quant_clocks