Issue #1066: implement PEP 3109, 2/3 of PEP 3134.

This commit is contained in:
Collin Winter 2007-08-31 00:04:24 +00:00
parent 150b7d7d02
commit 828f04ac3f
32 changed files with 761 additions and 253 deletions

View file

@ -54,7 +54,7 @@ def getFullVersion():
if 'PY_VERSION' in ln:
return ln.split()[-1][1:-1]
raise RuntimeError, "Cannot find full version??"
raise RuntimeError("Cannot find full version??")
# The directory we'll use to create the build (will be erased and recreated)
WORKDIR = "/tmp/_py"
@ -291,7 +291,7 @@ def runCommand(commandline):
xit = fd.close()
if xit != None:
sys.stdout.write(data)
raise RuntimeError, "command failed: %s"%(commandline,)
raise RuntimeError("command failed: %s"%(commandline,))
if VERBOSE:
sys.stdout.write(data); sys.stdout.flush()
@ -302,7 +302,7 @@ def captureCommand(commandline):
xit = fd.close()
if xit != None:
sys.stdout.write(data)
raise RuntimeError, "command failed: %s"%(commandline,)
raise RuntimeError("command failed: %s"%(commandline,))
return data
@ -361,7 +361,7 @@ def parseOptions(args=None):
SRCDIR=v
else:
raise NotImplementedError, k
raise NotImplementedError(k)
SRCDIR=os.path.abspath(SRCDIR)
WORKDIR=os.path.abspath(WORKDIR)
@ -418,7 +418,7 @@ def extractArchive(builddir, archiveName):
xit = fp.close()
if xit is not None:
sys.stdout.write(data)
raise RuntimeError, "Cannot extract %s"%(archiveName,)
raise RuntimeError("Cannot extract %s"%(archiveName,))
return os.path.join(builddir, retval)