CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/06/29 22:01:45
Modified files:
. : ChangeLog
python : lilylib.py
scm : define-markup-commands.scm
scripts : lilypond-book.py
Log message:
* scripts/lilypond-book.py (do_file): search for kpsewhich before
invoking.
* python/lilylib.py (search_exe_path): new function.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3841&tr2=1.3842&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/python/lilylib.py.diff?tr1=1.65&tr2=1.66&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/define-markup-commands.scm.diff?tr1=1.97&tr2=1.98&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scripts/lilypond-book.py.diff?tr1=1.265&tr2=1.266&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3841 lilypond/ChangeLog:1.3842
--- lilypond/ChangeLog:1.3841 Wed Jun 29 12:24:09 2005
+++ lilypond/ChangeLog Wed Jun 29 22:01:43 2005
@@ -1,5 +1,15 @@
+2005-06-30 Han-Wen Nienhuys <[EMAIL PROTECTED]>
+
+ * scripts/lilypond-book.py (do_file): search for kpsewhich before
+ invoking.
+
+ * python/lilylib.py (search_exe_path): new function.
+
2005-06-29 Han-Wen Nienhuys <[EMAIL PROTECTED]>
+ * python/lilylib.py (mkdir_p): remove setup_environment()
+ (backportme)
+
* buildscripts/mutopia-index.py (headertext): trim text.
* Documentation/topdocs/NEWS.tely (Top): refresh.
Index: lilypond/python/lilylib.py
diff -u lilypond/python/lilylib.py:1.65 lilypond/python/lilylib.py:1.66
--- lilypond/python/lilylib.py:1.65 Mon Jun 27 12:25:13 2005
+++ lilypond/python/lilylib.py Wed Jun 29 22:01:45 2005
@@ -400,54 +400,20 @@
system ('mkdir -p %s' % dir)
-def mkdir_p (dir, mode=0777):
- if not os.path.isdir (dir):
- makedirs (dir, mode)
+def search_exe_path (name):
+ p = os.environ['PATH']
+ exe_paths = string.split (p, ':')
+ for e in exe_paths:
+ full = os.path.join (e, name)
+ if os.path.exists (full):
+ return full
+ return None
-environment = {}
-# tex needs lots of memory, more than it gets by default on Debian
-non_path_environment = {
- 'extra_mem_top' : '1000000',
- 'extra_mem_bottom' : '1000000',
- 'pool_size' : '250000',
-}
-
-def setup_environment ():
- global environment
-
- kpse = read_pipe ('kpsexpand \$TEXMF')
- texmf = re.sub ('[ \t\n]+$','', kpse)
- type1_paths = read_pipe ('kpsewhich -expand-path=\$T1FONTS')
-
- environment = {
- # TODO: * prevent multiple addition.
- # * clean TEXINPUTS, MFINPUTS, TFMFONTS,
- # as these take prevalence over $TEXMF
- # and thus may break tex run?
-
- 'TEXMF' : "{%s,%s}" % (datadir, texmf) ,
-
- # 'GS_FONTPATH' : type1_paths,
- # 'GS_LIB' : datadir + '/ps',
- 'GS_FONTPATH' : "",
- 'GS_LIB' : "",
- }
-
- # $TEXMF is special, previous value is already taken care of
- if os.environ.has_key ('TEXMF'):
- del os.environ['TEXMF']
-
- for key in environment.keys ():
- val = environment[key]
- if os.environ.has_key (key):
- val = os.environ[key] + os.pathsep + val
- os.environ[key] = val
-
- for key in non_path_environment.keys ():
- val = non_path_environment[key]
- os.environ[key] = val
+def mkdir_p (dir, mode=0777):
+ if not os.path.isdir (dir):
+ makedirs (dir, mode)
def print_environment ():
for (k,v) in os.environ.items ():
Index: lilypond/scm/define-markup-commands.scm
diff -u lilypond/scm/define-markup-commands.scm:1.97
lilypond/scm/define-markup-commands.scm:1.98
--- lilypond/scm/define-markup-commands.scm:1.97 Wed Jun 29 11:32:53 2005
+++ lilypond/scm/define-markup-commands.scm Wed Jun 29 22:01:45 2005
@@ -463,7 +463,7 @@
(wordwrap-markups layout props args #f))
-(define (wordwrap-string layout props justify arg)
+(define (wordwrap-string layout props justify arg)
(let*
((baseline-skip (chain-assoc-get 'baseline-skip props))
(line-width (chain-assoc-get 'linewidth props))
Index: lilypond/scripts/lilypond-book.py
diff -u lilypond/scripts/lilypond-book.py:1.265
lilypond/scripts/lilypond-book.py:1.266
--- lilypond/scripts/lilypond-book.py:1.265 Tue Jun 28 20:06:40 2005
+++ lilypond/scripts/lilypond-book.py Wed Jun 29 22:01:45 2005
@@ -1409,7 +1409,7 @@
else:
if os.path.exists (input_filename):
input_fullname = input_filename
- elif format == LATEX:
+ elif format == LATEX and ly.search_exe_path ('kpsewhich'):
# urg python interface to libkpathsea?
input_fullname = ly.read_pipe ('kpsewhich '
+ input_filename)[:-1]
@@ -1577,7 +1577,6 @@
for p in include_path])
ly.identify (sys.stderr)
- ly.setup_environment ()
try:
chunks = do_file (file)
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs