Skip to content

Commit 9455244

Browse files
committedMar 14, 2018
bpo-32726: macOS installer changes for 3.6.5
Backport the new 10.9+ installer variant from 3.7. This variant features more modern options; like 64-bit only (Apple is deprecating 32-bit support in future macOS releases); a built-in version of Tcl/Tk 8.6.8; built with clang rather than gcc-4.2. For 3.6.5, the 10.9+ variant will be offered as an additional alternative to the traditional 10.6+ variant in earlier 3.6.x releases. Binary extension modules (including wheels) built for earlier versions of 3.6.x with the 10.6 variant should continue to work with either 3.6.5 variant without recompilation. In addition, both installer variants have updated 3rd-party libraries: OpenSSL 1.0.2m -> 1.0.2n XZ 5.2.2 -> 5.2.3 SQLite 3.21.0 -> 3.22.0 Also the 10.6 variant now sets CC=gcc instead of CC=gcc-4.2 and does not search for the outdated 10.6 SDK. The variant is built with the same compiler as before. As before, for extension module builds, the CC can be overridden with the CC env variable and an SDK can be specified with the SDKROOT env variable (see man xcrun). These minor changes should be transparent to nearly all users.
1 parent cad3eb2 commit 9455244

11 files changed

+236
-260
lines changed
 

‎Mac/BuildScript/build-installer.py

+137-160
Large diffs are not rendered by default.

‎Mac/BuildScript/issue19373_tk_8_5_15_source.patch

-13
This file was deleted.

‎Mac/BuildScript/openssl_sdk_makedepend.patch

-40
This file was deleted.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf200
2+
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 LucidaGrande-Bold;\f2\fnil\fcharset0 LucidaGrande;
3+
\f3\fnil\fcharset0 Monaco;}
4+
{\colortbl;\red255\green255\blue255;}
5+
{\*\expandedcolortbl;;}
6+
\margl1440\margr1440\vieww10540\viewh8400\viewkind0
7+
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
8+
9+
\f0\fs28 \cf0 Congratulations!
10+
\fs24
11+
\f1\b\fs28 Python $FULL_VERSION for macOS $MACOSX_DEPLOYMENT_TARGET
12+
\f2\b0 was successfully installed.
13+
\fs24 \
14+
\
15+
One more thing: to verify the identity of secure network connections, this Python needs a set of SSL root certificates. You can download and install a current curated set from {\field{\*\fldinst{HYPERLINK "https://pypi.org/project/certifi/"}}{\fldrslt the Certifi project}} by double-clicking on the
16+
\f3 Install Certificates
17+
\f2 icon in {\field{\*\fldinst{HYPERLINK "file://localhost/Applications/Python%20$VERSION/"}}{\fldrslt the Finder window}}. See {\field{\*\fldinst{HYPERLINK "file://localhost/Applications/Python%20$VERSION/ReadMe.rtf"}}{\fldrslt the
18+
\f3 ReadMe
19+
\f2 file}} for more information.\
20+
}

‎Mac/BuildScript/resources/ReadMe.rtf

+22-20
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,44 @@
1-
{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf750
1+
{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf200
22
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 CourierNewPSMT;}
33
{\colortbl;\red255\green255\blue255;}
44
{\*\expandedcolortbl;;}
55
\margl1440\margr1440\vieww13380\viewh14600\viewkind0
66
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
77

8-
\f0\fs24 \cf0 This package will install Python $FULL_VERSION for Mac OS X $MACOSX_DEPLOYMENT_TARGET for the following architecture(s): $ARCHITECTURES.\
8+
\f0\fs24 \cf0 This package will install Python $FULL_VERSION for macOS $MACOSX_DEPLOYMENT_TARGET for the following architecture(s): $ARCHITECTURES.\
99
\
1010
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
1111

12-
\b \cf0 \ul \ulc0 Which installer variant should I use?
12+
\b \cf0 \ul \ulc0 Which installer variant should I use? [CHANGED in 3.6.5]
1313
\b0 \ulnone \
1414
\
1515
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
1616

1717
\b \cf0 **NEW**
18-
\b0 For Python 3.6, the python.org website now provides only one installer variant for download: one that installs a
18+
\b0 With Python 3.6.5, the python.org website now provides two installer variants for download: one that installs a
19+
\i 64-bit-only
20+
\i0 Python capable of running on
21+
\i macOS 10.9 (Mavericks)
22+
\i0 or later; and one that installs a
1923
\i 64-bit/32-bit Intel
2024
\i0 Python capable of running on
21-
\i Mac OS X 10.6 (Snow Leopard)
22-
\i0 or later. This ReadMe was installed with the
25+
\i macOS 10.6 (Snow Leopard)
26+
\i0 or later. (This ReadMe was installed with the
2327
\i $MACOSX_DEPLOYMENT_TARGET
24-
\i0 variant. By default, Python will automatically run in 64-bit mode if your system supports it. The Python installed by this installer is built with private copies of some third-party libraries not included with or newer than those in OS X itself. The list of these libraries is included at the end of the License.rtf file.
25-
\b \ul \
26-
\
27-
Certificate verification and OpenSSL\
28+
\i0 variant.) Previous Python 3.6.x releases only provided the 10.6 or later installer. If you are running on macOS 10.9 or later and if you have no need for compatibility with older systems, use the 10.9 variant. Use the 10.6 variant if you are running on macOS 10.6 through 10.8, if you need to maintain compatibility with previous 3.6.x releases, or if you want to produce standalone applications that can run on systems from 10.6. The Pythons installed by these installers are built with private copies of some third-party libraries not included with or newer than those in macOS itself. The list of these libraries varies by installer variant and is included at the end of the License.rtf file.\
2829
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
2930

30-
\b0 \cf0 \ulnone \
31-
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
31+
\b \cf0 \ul \ulc0 \
32+
Certificate verification and OpenSSL\
3233
33-
\b \cf0 **NEW**
34-
\b0 This variant of Python 3.6 now includes its own private copy of OpenSSL 1.0.2. Unlike previous releases, the deprecated Apple-supplied OpenSSL libraries are no longer used. This also means that the trust certificates in system and user keychains managed by the
34+
\b0 \ulnone \
35+
This variant of Python 3.6 now includes its own private copy of OpenSSL 1.0.2. Unlike previous releases, the deprecated Apple-supplied OpenSSL libraries are no longer used. This also means that the trust certificates in system and user keychains managed by the
3536
\i Keychain Access
3637
\i0 application and the
3738
\i security
3839
\i0 command line utility are no longer used as defaults by the Python
3940
\f1 ssl
40-
\f0 module. For 3.6.0, a sample command script is included in
41+
\f0 module. A sample command script is included in
4142
\f1 /Applications/Python 3.6
4243
\f0 to install a curated bundle of default root certificates from the third-party
4344
\f1 certifi
@@ -49,16 +50,17 @@ The bundled
4950
\f1 pip
5051
\f0 included with the Python 3.6 installer has its own default certificate store for verifying download connections.\
5152
\
52-
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
5353

54-
\b \cf0 \ul Update your version of Tcl/Tk to use IDLE or other Tk applications
54+
\b \ul Using IDLE or other Tk applications [NEW/CHANGED in 3.6.5]
5555
\b0 \ulnone \
5656
\
57-
To use IDLE or other programs that use the Tkinter graphical user interface toolkit, you need to install a newer third-party version of the
57+
The 10.9+ installer variant comes with its own private version of Tcl/Tk 8.6. It does not use system-supplied or third-party supplied versions of Tcl/Tk.\
58+
\
59+
For the 10.6+ variant, you continue to need to install a newer third-party version of the
5860
\i Tcl/Tk
59-
\i0 frameworks. Visit {\field{\*\fldinst{HYPERLINK "https://www.python.org/download/mac/tcltk/"}}{\fldrslt https://www.python.org/download/mac/tcltk/}} for current information about supported and recommended versions of
61+
\i0 8.5 (not 8.6) frameworks to use IDLE or other programs that use the Tkinter graphical user interface toolkit. Visit {\field{\*\fldinst{HYPERLINK "https://www.python.org/download/mac/tcltk/"}}{\fldrslt https://www.python.org/download/mac/tcltk/}} for current information about supported and recommended versions of
6062
\i Tcl/Tk
61-
\i0 for this version of Python and of Mac OS X. For the initial release of Python 3.6, the installer is still linked with Tcl/Tk 8.5.\
63+
\i0 for this version of Python and of macOS.\
6264

6365
\b \ul \
6466
Other changes\

‎Mac/BuildScript/resources/Welcome.rtf

+11-21
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,24 @@
1-
{\rtf1\ansi\ansicpg1252\cocoartf1504
1+
{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf200
22
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
33
{\colortbl;\red255\green255\blue255;}
4-
{\*\expandedcolortbl;\csgray\c100000;}
4+
{\*\expandedcolortbl;;}
55
\paperw11905\paperh16837\margl1440\margr1440\vieww12200\viewh10880\viewkind0
6-
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\partightenfactor0
6+
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
77

88
\f0\fs24 \cf0 This package will install
99
\b Python $FULL_VERSION
1010
\b0 for
11-
\b Mac OS X $MACOSX_DEPLOYMENT_TARGET
11+
\b macOS $MACOSX_DEPLOYMENT_TARGET
1212
\b0 .\
13-
\
13+
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\partightenfactor0
14+
\cf0 \
1415

15-
\b Python for Mac OS X
16-
\b0 consists of the Python programming language interpreter, plus a set of programs to allow easy access to it for Mac OS X users including an integrated development environment
16+
\b Python for macOS
17+
\b0 consists of the Python programming language interpreter, plus a set of programs to allow easy access to it for macOS users including an integrated development environment
1718
\b IDLE
1819
\b0 .\
1920
\
20-
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\partightenfactor0
21-
22-
\b \cf0 NEW:
23-
\b0 There are important changes in this release regarding network security and trust certificates. Please see the ReadMe for more details.\
24-
\
25-
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\partightenfactor0
2621

27-
\b \cf0 IMPORTANT:
28-
\b0
29-
\b IDLE
30-
\b0 and other programs using the
31-
\b tkinter
32-
\b0 graphical user interface toolkit require specific versions of the
33-
\b Tcl/Tk
34-
\b0 platform independent windowing toolkit. Visit {\field{\*\fldinst{HYPERLINK "https://www.python.org/download/mac/tcltk/"}}{\fldrslt https://www.python.org/download/mac/tcltk/}} for current information on supported and recommended versions of Tcl/Tk for this version of Python and Mac OS X.}
22+
\b NEW in 3.6.5:
23+
\b0 two installer variants (10.9+ 64-bit-only, 10.6+ 64-/32-bit), built-in Tcl/Tk 8.6 support in the 10.9+ variant (no additional third-party downloads!)\
24+
}

‎Mac/BuildScript/scripts/postflight.documentation

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ SHARE_DOCDIR_TO_FWK="../../.."
1212
# make link in /Applications/Python m.n/ for Finder users
1313
if [ -d "${APPDIR}" ]; then
1414
ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html"
15+
open "${APPDIR}" || true # open the applications folder
1516
fi
1617

1718
# make share/doc link in framework for command line users
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Fix build failure with +quartz variant on OS X 10.8 and 10.9.
2+
Even though Gestalt was deprecated in OS X 10.8, it should work fine
3+
through OS X 10.9, and its replacement NSOperatingSystemVersion was
4+
not introduced until OS X 10.10.
5+
6+
Patch from MacPorts project and reported upstream:
7+
https://trac.macports.org/ticket/55649
8+
--- tk8.6.8/macosx/tkMacOSXXStubs.c.orig 2017-12-06 09:25:08.000000000 -0600
9+
+++ tk8.6.8-patched/macosx/tkMacOSXXStubs.c 2018-01-06 19:34:17.000000000 -0600
10+
@@ -175,7 +175,7 @@
11+
{
12+
int major, minor, patch;
13+
14+
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
15+
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
16+
Gestalt(gestaltSystemVersionMajor, (SInt32*)&major);
17+
Gestalt(gestaltSystemVersionMinor, (SInt32*)&minor);
18+
Gestalt(gestaltSystemVersionBugFix, (SInt32*)&patch);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Provide an additional, more modern macOS installer variant that supports
2+
macOS 10.9+ systems in 64-bit mode only. Upgrade the supplied third-party
3+
libraries to OpenSSL 1.0.2n, XZ 5.2.3, and SQLite 3.22.0. The 10.9+
4+
installer now links with and supplies its own copy of Tcl/Tk 8.6.8.

‎configure

+12-3
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,8 @@ Optional Packages:
14911491
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
14921492
--with-universal-archs=ARCH
14931493
select architectures for universal build ("32-bit",
1494-
"64-bit", "3-way", "intel", "intel-32", or "all")
1494+
"64-bit", "3-way", "intel", "intel-32", "intel-64",
1495+
or "all")
14951496
--with-framework-name=FRAMEWORK
14961497
specify an alternate name of the framework built
14971498
with --enable-framework
@@ -7345,6 +7346,11 @@ $as_echo "$CC" >&6; }
73457346
LIPO_32BIT_FLAGS=""
73467347
ARCH_RUN_32BIT=""
73477348
;;
7349+
intel-64)
7350+
UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7351+
LIPO_32BIT_FLAGS=""
7352+
ARCH_RUN_32BIT="true"
7353+
;;
73487354
3-way)
73497355
UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
73507356
LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
@@ -7355,11 +7361,14 @@ $as_echo "$CC" >&6; }
73557361
;;
73567362
esac
73577363

7358-
CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7359-
LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
73607364
if test "${UNIVERSALSDK}" != "/"
73617365
then
7366+
CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7367+
LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
73627368
CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7369+
else
7370+
CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7371+
LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
73637372
fi
73647373
fi
73657374

‎configure.ac

+11-3
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ fi
214214
AC_SUBST(LIPO_32BIT_FLAGS)
215215
AC_MSG_CHECKING(for --with-universal-archs)
216216
AC_ARG_WITH(universal-archs,
217-
AS_HELP_STRING([--with-universal-archs=ARCH], [select architectures for universal build ("32-bit", "64-bit", "3-way", "intel", "intel-32", or "all")]),
217+
AS_HELP_STRING([--with-universal-archs=ARCH], [select architectures for universal build ("32-bit", "64-bit", "3-way", "intel", "intel-32", "intel-64", or "all")]),
218218
[
219219
UNIVERSAL_ARCHS="$withval"
220220
],
@@ -1782,6 +1782,11 @@ yes)
17821782
LIPO_32BIT_FLAGS=""
17831783
ARCH_RUN_32BIT=""
17841784
;;
1785+
intel-64)
1786+
UNIVERSAL_ARCH_FLAGS="-arch x86_64"
1787+
LIPO_32BIT_FLAGS=""
1788+
ARCH_RUN_32BIT="true"
1789+
;;
17851790
3-way)
17861791
UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
17871792
LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
@@ -1792,11 +1797,14 @@ yes)
17921797
;;
17931798
esac
17941799

1795-
CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
1796-
LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
17971800
if test "${UNIVERSALSDK}" != "/"
17981801
then
1802+
CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
1803+
LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
17991804
CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
1805+
else
1806+
CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
1807+
LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
18001808
fi
18011809
fi
18021810

0 commit comments

Comments
 (0)
Please sign in to comment.