Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1029)

Unified Diff: scripts/lilypond-book.py

Issue 549740043: Cleanup python/ build rules.
Patch Set: rebase on whitespace changes Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/etf2ly.py ('k') | scripts/midi2ly.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/lilypond-book.py
diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py
index 175247b567af3f4b1efff913093a4d4d78f5d707..4ffb4b5f6fc73a505007de36e525d9b88fbe2a24 100644
--- a/scripts/lilypond-book.py
+++ b/scripts/lilypond-book.py
@@ -47,6 +47,7 @@ TODO:
import codecs
import fcntl
+import gettext
import glob
import hashlib
import os
@@ -62,6 +63,9 @@ from functools import reduce
@relocate-preamble@
"""
+# Load translation and install _() into Python's builtins namespace.
+gettext.install ('lilypond', '@localedir@')
+
import lilylib as ly
import fontextract
import langdefs
@@ -100,8 +104,13 @@ progress = ly.progress
warning = ly.warning
error = ly.error
+program_version = '@TOPLEVEL_VERSION@'
+if program_version.startswith("@"):
+ # '@' in lilypond-book output confuses texinfo
+ program_version = "dev"
+
def identify ():
- progress('%s (GNU LilyPond) %s' % (ly.program_name, ly.program_version))
+ progress('%s (GNU LilyPond) %s' % (ly.program_name, program_version))
def warranty ():
identify ()
@@ -609,7 +618,7 @@ def do_options ():
opt_parser = get_option_parser()
(global_options, args) = opt_parser.parse_args ()
- global_options.information = {'program_version': ly.program_version, 'program_name': ly.program_name }
+ global_options.information = {'program_version': program_version, 'program_name': ly.program_name }
global_options.original_dir = original_dir
if global_options.lily_output_dir:
« no previous file with comments | « scripts/etf2ly.py ('k') | scripts/midi2ly.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b