]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/lilypond-book.py
Fix #483.
[lilypond.git] / scripts / lilypond-book.py
index dd495fc7509e213d10fbe49c3153aefc5e4e9489..5b9c0d738f9b9669ee43eba424060a7b9a3cb423 100644 (file)
@@ -37,23 +37,9 @@ import sys
 import re
 import md5
 
-################
-# RELOCATION
-################
-
-
-for d in ['@lilypond_datadir@',
-          '@lilypond_libdir@']:
-    sys.path.insert (0, os.path.join (d, 'python'))
-
-# dynamic relocation, for GUB binaries.
-bindir = os.path.abspath (os.path.split (sys.argv[0])[0])
-
-os.environ['PATH'] = bindir + os.pathsep + os.environ['PATH']
-for p in ['share', 'lib']:
-    datadir = os.path.abspath (bindir + '/../%s/lilypond/current/python/' % p)
-    sys.path.insert (0, datadir)
-
+"""
+@relocate-preamble@
+"""
 
 import lilylib as ly
 import fontextract
@@ -115,7 +101,7 @@ def warranty ():
 
 %s
 %s
-''' % ( _ ('Copyright (c) %s by') % '2001--2006',
+''' % ( _ ('Copyright (c) %s by') % '2001--2007',
     ' '.join (authors),
    _ ("Distributed under terms of the GNU General Public License."),
    _ ("It comes with NO WARRANTY.")))
@@ -154,7 +140,7 @@ def get_option_parser ():
     p.add_option ('-P', '--process', metavar=_ ("COMMAND"),
                   help = _ ("process ly_files using COMMAND FILE..."),
                   action='store', 
-                  dest='process_cmd', default='lilypond -eps')
+                  dest='process_cmd', default='lilypond -dbackend=eps')
     p.add_option ('--pdf',
                   action="store_true",
                   dest="create_pdf",
@@ -690,17 +676,14 @@ if 0:
 PREAMBLE_LY = '''%%%% Generated by %(program_name)s
 %%%% Options: [%(option_string)s]
 \\include "lilypond-book-preamble.ly"
-%(preamble_string)s
-
-
-
-
 
 
 %% ****************************************************************
 %% Start cut-&-pastable-section 
 %% ****************************************************************
 
+%(preamble_string)s
+
 \paper {
   #(define dump-extents #t)
   %(font_dump_setting)s