summaryrefslogtreecommitdiffstats
path: root/Mac/BuildScript
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-12-07 14:41:05 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2010-12-07 14:41:05 (GMT)
commit0499d0b03ac934e767daf2a8170fa27ff4a1e397 (patch)
tree549a4fcb130fea91b1ff7386de6b956f9d6f42ce /Mac/BuildScript
parent7ed117addf090ac6423cf9e922204b9ac54fe619 (diff)
downloadcpython-0499d0b03ac934e767daf2a8170fa27ff4a1e397.zip
cpython-0499d0b03ac934e767daf2a8170fa27ff4a1e397.tar.gz
cpython-0499d0b03ac934e767daf2a8170fa27ff4a1e397.tar.bz2
Two small changes to adjust framework builds to the new stable ABI
Both the Makefile and the script that is used on OSX to create the binary installer refer to the directory containing the Makefile using the name 'config'. This name was changed with the new ABI (with default build flags it is now named config-3.2m). This patch ensures that both files use the correct name. The build-installer.py script contains one other change: it now tests for the Tcl/Tk framework version by looking at the 'Current' symlink in the framework instead of runnning a script. This makes it possible to verify the version that is in the SDK that's used during the build instead of the version that is installed on the system.
Diffstat (limited to 'Mac/BuildScript')
-rwxr-xr-xMac/BuildScript/build-installer.py34
1 files changed, 26 insertions, 8 deletions
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index 9ddfda9..db083b6 100755
--- a/Mac/BuildScript/build-installer.py
+++ b/Mac/BuildScript/build-installer.py
@@ -418,15 +418,16 @@ def checkEnvironment():
# to install a newer patch level.
for framework in ['Tcl', 'Tk']:
- fw = dict(lower=framework.lower(),
- upper=framework.upper(),
- cap=framework.capitalize())
- fwpth = "Library/Frameworks/%(cap)s.framework/%(lower)sConfig.sh" % fw
- sysfw = os.path.join('/System', fwpth)
+ #fw = dict(lower=framework.lower(),
+ # upper=framework.upper(),
+ # cap=framework.capitalize())
+ #fwpth = "Library/Frameworks/%(cap)s.framework/%(lower)sConfig.sh" % fw
+ fwpth = 'Library/Frameworks/Tcl.framework/Versions/Current'
+ sysfw = os.path.join(SDKPATH, 'System', fwpth)
libfw = os.path.join('/', fwpth)
usrfw = os.path.join(os.getenv('HOME'), fwpth)
- version = "%(upper)s_VERSION" % fw
- if getTclTkVersion(libfw, version) != getTclTkVersion(sysfw, version):
+ #version = "%(upper)s_VERSION" % fw
+ if os.readlink(libfw) != os.readlink(sysfw):
fatal("Version of %s must match %s" % (libfw, sysfw) )
if os.path.exists(usrfw):
fatal("Please rename %s to avoid possible dynamic load issues."
@@ -825,12 +826,29 @@ def buildPython():
os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IWGRP)
os.chown(p, -1, gid)
+ LDVERSION=None
+ VERSION=None
+ ABIFLAGS=None
+
+ with open(os.path.join(buildDir, 'Makefile')) as fp:
+ for ln in fp:
+ if ln.startswith('VERSION='):
+ VERSION=ln.split()[1]
+ if ln.startswith('ABIFLAGS='):
+ ABIFLAGS=ln.split()[1]
+
+ if ln.startswith('LDVERSION='):
+ LDVERSION=ln.split()[1]
+
+ LDVERSION = LDVERSION.replace('$(VERSION)', VERSION)
+ LDVERSION = LDVERSION.replace('$(ABIFLAGS)', ABIFLAGS)
+
# We added some directories to the search path during the configure
# phase. Remove those because those directories won't be there on
# the end-users system.
path =os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework',
'Versions', version, 'lib', 'python%s'%(version,),
- 'config', 'Makefile')
+ 'config-' + LDVERSION, 'Makefile')
fp = open(path, 'r')
data = fp.read()
fp.close()