summaryrefslogtreecommitdiffstats
path: root/Mac/BuildScript
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-30 18:39:28 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-30 18:39:28 (GMT)
commite7bf59f500481715e76ff646f6728e28361faff2 (patch)
tree3f3dcd530272bb5be36089c3f2f3345ee373012f /Mac/BuildScript
parent716c3ac40cae880193dfdbda39a0ca7ed7cd2854 (diff)
downloadcpython-e7bf59f500481715e76ff646f6728e28361faff2.zip
cpython-e7bf59f500481715e76ff646f6728e28361faff2.tar.gz
cpython-e7bf59f500481715e76ff646f6728e28361faff2.tar.bz2
Run 2to3's print fixer over some places that had been missed.
Diffstat (limited to 'Mac/BuildScript')
-rwxr-xr-xMac/BuildScript/build-installer.py72
1 files changed, 36 insertions, 36 deletions
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index 034828b..c7ebce8 100755
--- a/Mac/BuildScript/build-installer.py
+++ b/Mac/BuildScript/build-installer.py
@@ -336,16 +336,16 @@ def parseOptions(args=None):
options, args = getopt.getopt(args, '?hb',
[ 'build-dir=', 'third-party=', 'sdk-path=' , 'src-dir='])
except getopt.error as msg:
- print msg
+ print(msg)
sys.exit(1)
if args:
- print "Additional arguments"
+ print("Additional arguments")
sys.exit(1)
for k, v in options:
if k in ('-h', '-?'):
- print USAGE
+ print(USAGE)
sys.exit(0)
elif k in ('-d', '--build-dir'):
@@ -368,12 +368,12 @@ def parseOptions(args=None):
SDKPATH=os.path.abspath(SDKPATH)
DEPSRC=os.path.abspath(DEPSRC)
- print "Settings:"
- print " * Source directory:", SRCDIR
- print " * Build directory: ", WORKDIR
- print " * SDK location: ", SDKPATH
- print " * third-party source:", DEPSRC
- print ""
+ print("Settings:")
+ print(" * Source directory:", SRCDIR)
+ print(" * Build directory: ", WORKDIR)
+ print(" * SDK location: ", SDKPATH)
+ print(" * third-party source:", DEPSRC)
+ print("")
@@ -440,7 +440,7 @@ def downloadURL(url, fname):
pass
else:
if KNOWNSIZES.get(url) == size:
- print "Using existing file for", url
+ print("Using existing file for", url)
return
fpIn = urllib2.urlopen(url)
fpOut = open(fname, 'wb')
@@ -479,14 +479,14 @@ def buildRecipe(recipe, basedir, archList):
if os.path.exists(sourceArchive):
- print "Using local copy of %s"%(name,)
+ print("Using local copy of %s"%(name,))
else:
- print "Downloading %s"%(name,)
+ print("Downloading %s"%(name,))
downloadURL(url, sourceArchive)
- print "Archive for %s stored as %s"%(name, sourceArchive)
+ print("Archive for %s stored as %s"%(name, sourceArchive))
- print "Extracting archive for %s"%(name,)
+ print("Extracting archive for %s"%(name,))
buildDir=os.path.join(WORKDIR, '_bld')
if not os.path.exists(buildDir):
os.mkdir(buildDir)
@@ -549,14 +549,14 @@ def buildRecipe(recipe, basedir, archList):
configure_args.insert(0, configure)
configure_args = [ shellQuote(a) for a in configure_args ]
- print "Running configure for %s"%(name,)
+ print("Running configure for %s"%(name,))
runCommand(' '.join(configure_args) + ' 2>&1')
- print "Running install for %s"%(name,)
+ print("Running install for %s"%(name,))
runCommand('{ ' + install + ' ;} 2>&1')
- print "Done %s"%(name,)
- print ""
+ print("Done %s"%(name,))
+ print("")
os.chdir(curdir)
@@ -564,9 +564,9 @@ def buildLibraries():
"""
Build our dependencies into $WORKDIR/libraries/usr/local
"""
- print ""
- print "Building required libraries"
- print ""
+ print("")
+ print("Building required libraries")
+ print("")
universal = os.path.join(WORKDIR, 'libraries')
os.mkdir(universal)
os.makedirs(os.path.join(universal, 'usr', 'local', 'lib'))
@@ -580,7 +580,7 @@ def buildLibraries():
def buildPythonDocs():
# This stores the documentation as Resources/English.lproj/Docuentation
# inside the framwork. pydoc and IDLE will pick it up there.
- print "Install python documentation"
+ print("Install python documentation")
rootDir = os.path.join(WORKDIR, '_root')
version = getVersion()
docdir = os.path.join(rootDir, 'pydocs')
@@ -588,13 +588,13 @@ def buildPythonDocs():
name = 'html-%s.tar.bz2'%(getFullVersion(),)
sourceArchive = os.path.join(DEPSRC, name)
if os.path.exists(sourceArchive):
- print "Using local copy of %s"%(name,)
+ print("Using local copy of %s"%(name,))
else:
- print "Downloading %s"%(name,)
+ print("Downloading %s"%(name,))
downloadURL('http://www.python.org/ftp/python/doc/%s/%s'%(
getFullVersion(), name), sourceArchive)
- print "Archive for %s stored as %s"%(name, sourceArchive)
+ print("Archive for %s stored as %s"%(name, sourceArchive))
extractArchive(os.path.dirname(docdir), sourceArchive)
os.rename(
@@ -604,7 +604,7 @@ def buildPythonDocs():
def buildPython():
- print "Building a universal python"
+ print("Building a universal python")
buildDir = os.path.join(WORKDIR, '_bld', 'python')
rootDir = os.path.join(WORKDIR, '_root')
@@ -627,24 +627,24 @@ def buildPython():
# several paths.
version = getVersion()
- print "Running configure..."
+ print("Running configure...")
runCommand("%s -C --enable-framework --enable-universalsdk=%s LDFLAGS='-g -L%s/libraries/usr/local/lib' OPT='-g -O3 -I%s/libraries/usr/local/include' 2>&1"%(
shellQuote(os.path.join(SRCDIR, 'configure')),
shellQuote(SDKPATH), shellQuote(WORKDIR)[1:-1],
shellQuote(WORKDIR)[1:-1]))
- print "Running make"
+ print("Running make")
runCommand("make")
- print "Running make frameworkinstall"
+ print("Running make frameworkinstall")
runCommand("make frameworkinstall DESTDIR=%s"%(
shellQuote(rootDir)))
- print "Running make frameworkinstallextras"
+ print("Running make frameworkinstallextras")
runCommand("make frameworkinstallextras DESTDIR=%s"%(
shellQuote(rootDir)))
- print "Copying required shared libraries"
+ print("Copying required shared libraries")
if os.path.exists(os.path.join(WORKDIR, 'libraries', 'Library')):
runCommand("mv %s/* %s"%(
shellQuote(os.path.join(
@@ -655,7 +655,7 @@ def buildPython():
'Python.framework', 'Versions', getVersion(),
'lib'))))
- print "Fix file modes"
+ print("Fix file modes")
frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework')
gid = grp.getgrnam('admin').gr_gid
@@ -744,7 +744,7 @@ def packageFromRecipe(targetDir, recipe):
readme = textwrap.dedent(recipe['readme'])
isRequired = recipe.get('required', True)
- print "- building package %s"%(pkgname,)
+ print("- building package %s"%(pkgname,))
# Substitute some variables
textvars = dict(
@@ -1047,9 +1047,9 @@ def main():
shutil.copy('../../LICENSE', os.path.join(WORKDIR, 'installer', 'License.txt'))
fp = open(os.path.join(WORKDIR, 'installer', 'Build.txt'), 'w')
- print >> fp, "# BUILD INFO"
- print >> fp, "# Date:", time.ctime()
- print >> fp, "# By:", pwd.getpwuid(os.getuid()).pw_gecos
+ print("# BUILD INFO", file=fp)
+ print("# Date:", time.ctime(), file=fp)
+ print("# By:", pwd.getpwuid(os.getuid()).pw_gecos, file=fp)
fp.close()
# Custom icon for the DMG, shown when the DMG is mounted.