From 905109ea0e90efa8d9c1ba02769e458a0707cc47 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 31 May 2016 13:37:03 +0200 Subject: Issue 4870: [midi2ly] Delay import of 'midi' module. `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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/midi2ly.py b/scripts/midi2ly.py index f4a47fb79a..5358fc4698 100644 --- a/scripts/midi2ly.py +++ b/scripts/midi2ly.py @@ -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 -- cgit v1.2.3