From 7db557cbf9bd5c0f20f9d3ee4f526345a0dd333c Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 01:02:19 +0000 Subject: [PATCH] lilypond-1.5.31 --- buildscripts/clean-fonts.sh | 5 ++++- stepmake/bin/packagepython.py | 42 ++++++++++++++++------------------- stepmake/bin/release.py | 2 +- 3 files changed, 24 insertions(+), 25 deletions(-) diff --git a/buildscripts/clean-fonts.sh b/buildscripts/clean-fonts.sh index e8d457f32e..395a35cff7 100644 --- a/buildscripts/clean-fonts.sh +++ b/buildscripts/clean-fonts.sh @@ -31,7 +31,10 @@ if [ -z "$TEXDIRS" -o "$TEXDIRS" = "." ]; then fi # remove possibly stale .pk/.tfm files -FILES=`find $TEXDIRS -name "feta*$WHAT*tfm" -or -name "feta*$WHAT*pk"` +FILES=$(find $TEXDIRS -name "feta*$WHAT*tfm" \ + -or -name "feta*$WHAT*pk" \ + -or -name "parmesan$WHAT*tfm" \ + -or -name "parmesan*$WHAT*pk") echo removing $FILES rm -f $FILES /tmp/cleaning-font-dummy diff --git a/stepmake/bin/packagepython.py b/stepmake/bin/packagepython.py index 9fb12ff074..86fc71969c 100755 --- a/stepmake/bin/packagepython.py +++ b/stepmake/bin/packagepython.py @@ -10,15 +10,14 @@ # (c) 1997--1998 Han-Wen Nienhuys # Jan Nieuwenhuizen -import regex -import regsub +import re import string import sys import os import getopt -make_assign_re = regex.compile('^\([A-Z_]*\)=\(.*\)$') +make_assign_re = re.compile ('^([A-Z_]*)=(.*)$') def read_makefile (fn): file = open (fn) @@ -29,9 +28,10 @@ def read_makefile (fn): make_dict = {} for l in lines: - if make_assign_re.search(l) <> -1: - nm = make_assign_re.group(1) - val = make_assign_re.group(2) + m = make_assign_re.search (l) + if m: + nm = m.group (1) + val = m.group (2) make_dict[nm] = val return make_dict @@ -39,7 +39,7 @@ class Package: def __init__ (self, dirname): dict = read_makefile (dirname + '/VERSION') version_list = [] - for x in [ 'MAJOR_VERSION', 'MINOR_VERSION', 'PATCH_LEVEL']: + for x in [ 'MAJOR_VERSION', 'MINOR_VERSION', 'PATCH_LEVEL']: version_list.append (string.atoi (dict[x])) version_list.append (dict['MY_PATCH_LEVEL']) self.topdir = dirname @@ -80,10 +80,9 @@ def full_version_tup(tup): break return tuple(t) -def split_my_patchlevel(str): - return (regsub.sub('[0-9]*$', '', str), - string.atoi(regsub.sub('[^0-9]*', '', str))) - +def split_my_patchlevel (str): + m = re.match ('(.*?)([0-9]*)$', str) + return (m.group (1), string.atoi (m.group (2))) def next_version(tup): l = list(full_version_tup (tup)) @@ -103,7 +102,7 @@ def prev_version(tup): l = list(full_version_tup (tup)) t3name=t3num='' if l[3]: - (t3name,t3num)= split_my_patchlevel (l[3]) + (t3name, t3num) = split_my_patchlevel (l[3]) if t3num and t3num - 1 > 0: t3num = '%d' %(t3num - 1) else: @@ -129,24 +128,21 @@ def version_str_to_tuple(str): mypatch = string.join (t[3:], '.') return (string.atoi(t[0]), string.atoi(t[1]), string.atoi(t[2]), mypatch) -def version_compare (tupl, tupr): - tupl = full_version_tup (tupl) - tupr = full_version_tup (tupr) +def version_compare (ltup, rtup): + rtup = full_version_tup (ltup) + rtup = full_version_tup (rtup) for i in (0,1,2): - if tupl[i] - tupr[i]: return tupl[i] - tupr[i] - if tupl[3] and tupr[3]: - lname = regsub.sub('[0-9]*$', '', tupl[3]) - lnum = string.atoi(regsub.sub('[^0-9]*', '', tupl[3])) - rname = regsub.sub('[0-9]*$', '', tupr[3]) - rnum = string.atoi(regsub.sub('[^0-9]*', '', tupr[3])) + if ltup[i] - rtup[i]: return ltup[i] - rtup[i] + if ltup[3] and rtup[3]: + (lname, lnum) = split_my_patchlevel (ltup[i]) + (rname, rnum) = split_my_patchlevel (rtup[3]) if lname != rname: raise 'ambiguous' return sign (lnum - rnum) - if tupl[3]: + if ltup[3]: return 1 else: return -1 - if __name__ == '__main__': p = Package ('.') diff --git a/stepmake/bin/release.py b/stepmake/bin/release.py index 4b563143da..864c157558 100755 --- a/stepmake/bin/release.py +++ b/stepmake/bin/release.py @@ -51,7 +51,7 @@ if status: cur_ver = package.version -pn = '%s-%s' %(package.name, version_tuple_to_str(cur_ver)) +pn = '%s-%s' % (package.name, version_tuple_to_str (cur_ver)) tarball = pn + '.tar.gz' orig = os.path.join (outdir, tarball) try: -- 2.39.5