X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Flilypond-book.py;h=be9fef694a5d81049d92799b4ecb39d18498fbc9;hb=04c60c47270930d2cca034bfbd0104bda3abbf6a;hp=1f925c13bde7094a954d579f3e64c35cc4bc0c08;hpb=e72fc73821781e72d20730f0f79c2a16f52cc947;p=lilypond.git diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 1f925c13bd..be9fef694a 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -45,6 +45,7 @@ import fontextract import langdefs global _;_=ly._ +ly.require_python_version () # Lilylib globals. program_version = '@TOPLEVEL_VERSION@' @@ -205,6 +206,12 @@ def get_option_parser (): lilypond_binary = os.path.join ('@bindir@', 'lilypond') +# If we are called with full path, try to use lilypond binary +# installed in the same path; this is needed in GUB binaries, where +# @bindir is always different from the installed binary path. +if 'bindir' in globals () and bindir: + lilypond_binary = os.path.join (bindir, 'lilypond') + # Only use installed binary when we are installed too. if '@bindir@' == ('@' + 'bindir@') or not os.path.exists (lilypond_binary): lilypond_binary = 'lilypond' @@ -1595,7 +1602,7 @@ def process_snippets (cmd, snippets, 'snippet-names-%d.ly' % checksum) file (name, 'wb').write (contents) - system_in_directory (' '.join ([cmd, name]), + system_in_directory (' '.join ([cmd, ly.mkarg (name)]), lily_output_dir)