aboutsummaryrefslogtreecommitdiff
path: root/Mac
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2020-11-22 03:05:34 +0100
committerGitHub <noreply@github.com>2020-11-21 18:05:34 -0800
commit690a5fa3ddc675a434730b057ddb5c33f44fd0b7 (patch)
treec804974b526001ec38c3ba6c8b0d1e0408aa5cbd /Mac
parentbpo-38443: Check that the specified universal architectures work (GH-22910) (diff)
downloadcpython-690a5fa3ddc675a434730b057ddb5c33f44fd0b7.tar.gz
cpython-690a5fa3ddc675a434730b057ddb5c33f44fd0b7.tar.bz2
cpython-690a5fa3ddc675a434730b057ddb5c33f44fd0b7.zip
bpo-42361: Use Tcl/Tk 8.6.10 when building the installer on recent macOS (GH-23293)
Building on older versions, and in particular macOS 10.9 still use Tk 8.6.8 because of build problems on that version of macOS.
Diffstat (limited to 'Mac')
-rwxr-xr-xMac/BuildScript/build-installer.py41
1 files changed, 32 insertions, 9 deletions
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index 0e76d3ca5bb..184add4c4f0 100755
--- a/Mac/BuildScript/build-installer.py
+++ b/Mac/BuildScript/build-installer.py
@@ -153,6 +153,9 @@ DEPTARGET = '10.5'
def getDeptargetTuple():
return tuple([int(n) for n in DEPTARGET.split('.')[0:2]])
+def getBuildTuple():
+ return tuple([int(n) for n in platform.mac_ver()[0].split('.')[0:2]])
+
def getTargetCompilers():
target_cc_map = {
'10.4': ('gcc-4.0', 'g++-4.0'),
@@ -192,6 +195,13 @@ EXPECTED_SHARED_LIBS = {}
def internalTk():
return getDeptargetTuple() >= (10, 6)
+# Do we use 8.6.8 when building our own copy
+# of Tcl/Tk or a modern version.
+# We use the old version when buildin on
+# old versions of macOS due to build issues.
+def useOldTk():
+ return getBuildTuple() < (10, 15)
+
def tweak_tcl_build(basedir, archList):
with open("Makefile", "r") as fp:
@@ -245,11 +255,26 @@ def library_recipes():
])
if internalTk():
+ if useOldTk():
+ tcl_tk_ver='8.6.8'
+ tcl_checksum='81656d3367af032e0ae6157eff134f89'
+
+ tk_checksum='5e0faecba458ee1386078fb228d008ba'
+ tk_patches = ['tk868_on_10_8_10_9.patch']
+
+ else:
+ tcl_tk_ver='8.6.10'
+ tcl_checksum='97c55573f8520bcab74e21bfd8d0aadc'
+
+ tk_checksum='602a47ad9ecac7bf655ada729d140a94'
+ tk_patches = [ ]
+
+
result.extend([
dict(
- name="Tcl 8.6.8",
- url="ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tcl8.6.8-src.tar.gz",
- checksum='81656d3367af032e0ae6157eff134f89',
+ name="Tcl %s"%(tcl_tk_ver,),
+ url="ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tcl%s-src.tar.gz"%(tcl_tk_ver,),
+ checksum=tcl_checksum,
buildDir="unix",
configure_pre=[
'--enable-shared',
@@ -264,12 +289,10 @@ def library_recipes():
},
),
dict(
- name="Tk 8.6.8",
- url="ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tk8.6.8-src.tar.gz",
- checksum='5e0faecba458ee1386078fb228d008ba',
- patches=[
- "tk868_on_10_8_10_9.patch",
- ],
+ name="Tk %s"%(tcl_tk_ver,),
+ url="ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tk%s-src.tar.gz"%(tcl_tk_ver,),
+ checksum=tk_checksum,
+ patches=tk_patches,
buildDir="unix",
configure_pre=[
'--enable-aqua',