summaryrefslogtreecommitdiffstats
path: root/Mac/BuildScript/build-installer.py
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2006-06-11 20:24:45 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2006-06-11 20:24:45 (GMT)
commitc55555400eb497ff2eca54947feb40b1fa127190 (patch)
treeb8bfe85df7f34f67fd4acaa09cfb5524b5c3b26e /Mac/BuildScript/build-installer.py
parent4fbb080bc16de9f37a84d517e84bae5dbe12fc8e (diff)
downloadcpython-c55555400eb497ff2eca54947feb40b1fa127190.zip
cpython-c55555400eb497ff2eca54947feb40b1fa127190.tar.gz
cpython-c55555400eb497ff2eca54947feb40b1fa127190.tar.bz2
- Change fixapplepython23.py to ensure that it will run with /usr/bin/python
on intel macs. - Fix some minor problems in the installer for OSX
Diffstat (limited to 'Mac/BuildScript/build-installer.py')
-rwxr-xr-xMac/BuildScript/build-installer.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index 05afe98..15c754e 100755
--- a/Mac/BuildScript/build-installer.py
+++ b/Mac/BuildScript/build-installer.py
@@ -236,7 +236,7 @@ PKG_RECIPES=[
Mac OS X 10.3 to ensure that you can build new python extensions
using that copy of python after installing this version of
python.
- """
+ """,
postflight="../Tools/fixapplepython23.py",
topdir="/Library/Frameworks/Python.framework",
source="/empty-dir",
@@ -686,6 +686,9 @@ def patchFile(inPath, outPath):
data = data.replace('$MACOSX_DEPLOYMENT_TARGET', '10.3 or later')
data = data.replace('$ARCHITECTURES', "i386, ppc")
data = data.replace('$INSTALL_SIZE', installSize())
+
+ # This one is not handy as a template variable
+ data = data.replace('$PYTHONFRAMEWORKINSTALLDIR', '/Library/Frameworks/Python.framework')
fp = open(outPath, 'wb')
fp.write(data)
fp.close()
@@ -703,7 +706,10 @@ def patchScript(inPath, outPath):
def packageFromRecipe(targetDir, recipe):
curdir = os.getcwd()
try:
- pkgname = recipe['name']
+ # The major version (such as 2.5) is included in the pacakge name
+ # because haveing two version of python installed at the same time is
+ # common.
+ pkgname = '%s-%s'%(recipe['name'], getVersion())
srcdir = recipe.get('source')
pkgroot = recipe.get('topdir', srcdir)
postflight = recipe.get('postflight')
@@ -804,7 +810,7 @@ def makeMpkgPlist(path):
IFPkgFlagComponentDirectory="Contents/Packages",
IFPkgFlagPackageList=[
dict(
- IFPkgFlagPackageLocation='%s.pkg'%(item['name']),
+ IFPkgFlagPackageLocation='%s-%s.pkg'%(item['name'], getVersion()),
IFPkgFlagPackageSelection='selected'
)
for item in PKG_RECIPES
@@ -812,6 +818,7 @@ def makeMpkgPlist(path):
IFPkgFormatVersion=0.10000000149011612,
IFPkgFlagBackgroundScaling="proportional",
IFPkgFlagBackgroundAlignment="left",
+ IFPkgFlagAuthorizationAction="RootAuthorization",
)
writePlist(pl, path)
@@ -859,7 +866,7 @@ def buildInstaller():
else:
patchFile(os.path.join('resources', fn), os.path.join(rsrcDir, fn))
- shutil.copy("../../../LICENSE", os.path.join(rsrcDir, 'License.txt'))
+ shutil.copy("../../LICENSE", os.path.join(rsrcDir, 'License.txt'))
def installSize(clear=False, _saved=[]):
@@ -1005,7 +1012,7 @@ def main():
patchFile('resources/ReadMe.txt', os.path.join(WORKDIR, 'installer', 'ReadMe.txt'))
# Ditto for the license file.
- shutil.copy('../../../LICENSE', os.path.join(WORKDIR, 'installer', 'License.txt'))
+ shutil.copy('../../LICENSE', os.path.join(WORKDIR, 'installer', 'License.txt'))
fp = open(os.path.join(WORKDIR, 'installer', 'Build.txt'), 'w')
print >> fp, "# BUILD INFO"