import langdefs
global _;_=ly._
+ly.require_python_version ()
# Lilylib globals.
program_version = '@TOPLEVEL_VERSION@'
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'
'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)