]> git.donarmstrong.com Git - lilypond.git/commitdiff
Handle LilyPond version better.
authorJohn Gourlay <john@weathervanefarm.net>
Sat, 5 Mar 2016 03:27:02 +0000 (22:27 -0500)
committerJohn Gourlay <john@weathervanefarm.net>
Sat, 5 Mar 2016 03:27:02 +0000 (22:27 -0500)
python/musicexp.py
scripts/musicxml2ly.py

index a0b13efcc6bb2ebfa7dc4c2a4f5e9a92230f280b..c2c2b1b60db63100e290aab008f5d4069a069924 100644 (file)
@@ -57,8 +57,8 @@ class Output_printer(object):
     def set_file (self, file):
         self._file = file
 
-    def dump_version (self):
-        self.print_verbatim ('\\version "2.19.15"')
+    def dump_version (self, version):
+        self.print_verbatim ('\\version "' + version + '"')
         self.newline ()
 
     def get_indent (self):
index fa6e69c0cee9d63b7862805ca5c61502d8ded923..7c5dc69c1a749a67531a4df0dfe82d1ca7202429 100644 (file)
@@ -2776,7 +2776,7 @@ If the given filename is -, musicxml2ly reads from the command line.
                  action="help",
                  help=_("show this help and exit"))
 
-    p.version = ('''%prog (LilyPond) @TOPLEVEL_VERSION@\n\n'''
+    p.version = ('%prog (LilyPond) ' + lilypond_version + '\n\n'
 +
 _ ("""Copyright (c) 2005--2015 by
     Han-Wen Nienhuys <hanwen@xs4all.nl>,
@@ -3056,7 +3056,7 @@ def update_layout_information():
 #  \n\t\t\t\t\\override StringNumber #\'stencil = ##f
 
 def print_ly_preamble(printer, filename):
-    printer.dump_version()
+    printer.dump_version(lilypond_version)
     printer.print_verbatim('% automatically converted by philomelos musicxml2ly v0.2.41\n')
     printer.newline()
     printer.dump(r'\pointAndClickOff')
@@ -3217,6 +3217,8 @@ def get_existing_filename_with_extension(filename, ext):
 
 
 def main():
+    global lilypond_version
+    lilypond_version = "@TOPLEVEL_VERSION@"
     opt_parser = option_parser()
 
     global options