summaryrefslogtreecommitdiffstats
path: root/Mac/scripts/fullbuild.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-01-02 22:02:02 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-01-02 22:02:02 (GMT)
commitbe614ee732e5b0f292c272372794f940d7e1f4e6 (patch)
tree06af4765d98edcf0b367cfb0abdd415cb9ffae23 /Mac/scripts/fullbuild.py
parentef92edd9036fd446cf5d51fbd8342957dcc3cf60 (diff)
downloadcpython-be614ee732e5b0f292c272372794f940d7e1f4e6.zip
cpython-be614ee732e5b0f292c272372794f940d7e1f4e6.tar.gz
cpython-be614ee732e5b0f292c272372794f940d7e1f4e6.tar.bz2
Use re in stead of regex.
Diffstat (limited to 'Mac/scripts/fullbuild.py')
-rw-r--r--Mac/scripts/fullbuild.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Mac/scripts/fullbuild.py b/Mac/scripts/fullbuild.py
index 73ccc8f..4f718fd 100644
--- a/Mac/scripts/fullbuild.py
+++ b/Mac/scripts/fullbuild.py
@@ -16,7 +16,7 @@ import sys
import macfs
import MacOS
import EasyDialogs
-import regex
+import re
import string
import aetools
@@ -278,11 +278,11 @@ def incbuildno(filename):
line = fp.readline()
fp.close()
- pat = regex.compile('#define BUILD \([0-9][0-9]*\)')
- pat.match(line)
- buildno = pat.group(1)
- if not buildno:
+ pat = re.compile('#define BUILD ([0-9]+)')
+ m = pat.search(line)
+ if not m or not m.group(1):
raise 'Incorrect macbuildno.h line', line
+ buildno = m.group(1)
new = string.atoi(buildno) + 1
fp = open(filename, 'w')
fp.write('#define BUILD %d\n'%new)