Commit e1c97949 authored by Ned Deily's avatar Ned Deily

Issue #14018: Backport OS X installer updates from 3.3.

parent 8d15ca3c
...@@ -8,70 +8,84 @@ $DESTROOT, massages that installation to remove .pyc files and such, creates ...@@ -8,70 +8,84 @@ $DESTROOT, massages that installation to remove .pyc files and such, creates
an Installer package from the installation plus other files in ``resources`` an Installer package from the installation plus other files in ``resources``
and ``scripts`` and placed that on a ``.dmg`` disk image. and ``scripts`` and placed that on a ``.dmg`` disk image.
As of Python 2.7.x and 3.2, PSF practice is to build two installer variants For Python 2.7.x and 3.2.x, PSF practice is to build two installer variants
for each release: for each release.
1. 32-bit-only, i386 and PPC universal, capable on running on all machines 1. 32-bit-only, i386 and PPC universal, capable on running on all machines
supported by Mac OS X 10.3.9 through (at least) 10.6:: supported by Mac OS X 10.3.9 through (at least) 10.8::
python build-installer.py \ /usr/bin/python build-installer.py \
--sdk-path=/Developer/SDKs/MacOSX10.4u.sdk \ --sdk-path=/Developer/SDKs/MacOSX10.4u.sdk \
--universal-archs=32-bit \ --universal-archs=32-bit \
--dep-target=10.3 --dep-target=10.3
# These are the current default options
- builds the following third-party libraries - builds the following third-party libraries
* Bzip2 * Bzip2
* Zlib 1.2.3
* GNU Readline (GPL)
* SQLite 3
* NCurses * NCurses
* GNU Readline (GPL)
* SQLite 3.7.13
* Zlib 1.2.3
* Oracle Sleepycat DB 4.8 (Python 2.x only) * Oracle Sleepycat DB 4.8 (Python 2.x only)
- requires ActiveState ``Tcl/Tk 8.4`` (currently 8.4.19) to be installed for building - requires ActiveState ``Tcl/Tk 8.4`` (currently 8.4.19) to be installed for building
- current target build environment: - recommended build environment:
* Mac OS X 10.5.8 PPC or Intel * Mac OS X 10.5.8 PPC or Intel
* Xcode 3.1.4 (or later) * Xcode 3.1.4
* ``MacOSX10.4u`` SDK (later SDKs do not support PPC G3 processors) * ``MacOSX10.4u`` SDK (later SDKs do not support PPC G3 processors)
* ``MACOSX_DEPLOYMENT_TARGET=10.3`` * ``MACOSX_DEPLOYMENT_TARGET=10.3``
* Apple ``gcc-4.0`` * Apple ``gcc-4.0``
* Python 2.n (n >= 4) for documentation build with Sphinx * system Python 2.5 for documentation build with Sphinx
- alternate build environments: - alternate build environments:
* Mac OS X 10.4.11 with Xcode 2.5 * Mac OS X 10.6.8 with Xcode 3.2.6
* Mac OS X 10.6.6 with Xcode 3.2.5
- need to change ``/System/Library/Frameworks/{Tcl,Tk}.framework/Version/Current`` to ``8.4`` - need to change ``/System/Library/Frameworks/{Tcl,Tk}.framework/Version/Current`` to ``8.4``
* Note Xcode 4.* does not support building for PPC so cannot be used for this build
2. 64-bit / 32-bit, x86_64 and i386 universal, for OS X 10.6 (and later):: 2. 64-bit / 32-bit, x86_64 and i386 universal, for OS X 10.6 (and later)::
python build-installer.py \ /usr/bin/python build-installer.py \
--sdk-path=/Developer/SDKs/MacOSX10.6.sdk \ --sdk-path=/Developer/SDKs/MacOSX10.6.sdk \
--universal-archs=intel \ --universal-archs=intel \
--dep-target=10.6 --dep-target=10.6
- builds the following third-party libraries
* NCurses 5.9 (http://bugs.python.org/issue15037)
* SQLite 3.7.13
- uses system-supplied versions of third-party libraries - uses system-supplied versions of third-party libraries
* readline module links with Apple BSD editline (libedit) * readline module links with Apple BSD editline (libedit)
* builds Oracle Sleepycat DB 4.8 (Python 2.x only) * builds Oracle Sleepycat DB 4.8 (Python 2.x only)
- requires ActiveState Tcl/Tk 8.5.9 (or later) to be installed for building - requires ActiveState Tcl/Tk 8.5.9 (or later) to be installed for building
- current target build environment: - recommended build environment:
* Mac OS X 10.6.6 (or later) * Mac OS X 10.6.8 (or later)
* Xcode 3.2.5 (or later) * Xcode 3.2.6
* ``MacOSX10.6`` SDK * ``MacOSX10.6`` SDK
* ``MACOSX_DEPLOYMENT_TARGET=10.6`` * ``MACOSX_DEPLOYMENT_TARGET=10.6``
* Apple ``gcc-4.2`` * Apple ``gcc-4.2``
* Python 2.n (n >= 4) for documentation build with Sphinx * system Python 2.6 for documentation build with Sphinx
- alternate build environments: - alternate build environments:
* none * none. Xcode 4.x currently supplies two C compilers.
``llvm-gcc-4.2.1`` has been found to miscompile Python 3.3.x and
produce a non-functional Python executable. As it appears to be
considered a migration aid by Apple and is not likely to be fixed,
its use should be avoided. The other compiler, ``clang``, has been
undergoing rapid development. While it appears to have become
production-ready in the most recent Xcode 4 releases (Xcode 4.5.x
as of this writing), there are still some open issues when
building Python and there has not yet been the level of exposure in
production environments that the Xcode 3 gcc-4.2 compiler has had.
General Prerequisites General Prerequisites
...@@ -87,6 +101,11 @@ General Prerequisites ...@@ -87,6 +101,11 @@ General Prerequisites
* It is safest to start each variant build with an empty source directory * It is safest to start each variant build with an empty source directory
populated with a fresh copy of the untarred source. populated with a fresh copy of the untarred source.
* It is recommended that you remove any existing installed version of the
Python being built::
sudo rm -rf /Library/Frameworks/Python.framework/Versions/n.n
The Recipe The Recipe
---------- ----------
...@@ -107,9 +126,9 @@ Building other universal installers ...@@ -107,9 +126,9 @@ Building other universal installers
................................... ...................................
It is also possible to build a 4-way universal installer that runs on It is also possible to build a 4-way universal installer that runs on
OS X Leopard or later:: OS X 10.5 Leopard or later::
python 2.6 /build-installer.py \ /usr/bin/python /build-installer.py \
--dep-target=10.5 --dep-target=10.5
--universal-archs=all --universal-archs=all
--sdk-path=/Developer/SDKs/MacOSX10.5.sdk --sdk-path=/Developer/SDKs/MacOSX10.5.sdk
...@@ -120,7 +139,8 @@ also that you are building on at least OS X 10.5. 4-way includes ...@@ -120,7 +139,8 @@ also that you are building on at least OS X 10.5. 4-way includes
variants can only be run on G5 machines running 10.5. Note that, variants can only be run on G5 machines running 10.5. Note that,
while OS X 10.6 is only supported on Intel-based machines, it is possible while OS X 10.6 is only supported on Intel-based machines, it is possible
to run ``ppc`` (32-bit) executables unmodified thanks to the Rosetta ppc to run ``ppc`` (32-bit) executables unmodified thanks to the Rosetta ppc
emulation in OS X 10.5 and 10.6. emulation in OS X 10.5 and 10.6. The 4-way installer variant must be
built with Xcode 3. It is not regularly built or tested.
Other ``--universal-archs`` options are ``64-bit`` (``x86_64``, ``ppc64``), Other ``--universal-archs`` options are ``64-bit`` (``x86_64``, ``ppc64``),
and ``3-way`` (``ppc``, ``i386``, ``x86_64``). None of these options and ``3-way`` (``ppc``, ``i386``, ``x86_64``). None of these options
...@@ -133,15 +153,21 @@ Testing ...@@ -133,15 +153,21 @@ Testing
Ideally, the resulting binaries should be installed and the test suite run Ideally, the resulting binaries should be installed and the test suite run
on all supported OS X releases and architectures. As a practical matter, on all supported OS X releases and architectures. As a practical matter,
that is generally not possible. At a minimum, variant 1 should be run on that is generally not possible. At a minimum, variant 1 should be run on
at least one Intel, one PPC G4, and one PPC G3 system and one each of a PPC G4 system with OS X 10.5 and at least one Intel system running OS X
OS X 10.6, 10.5, 10.4, and 10.3.9. Not all tests run on 10.3.9. 10.8, 10.7, 10.6, or 10.5. Variant 2 should be run on 10.8, 10.7, and 10.6
Variant 2 should be run on 10.6 in both 32-bit and 64-bit modes.:: systems in both 32-bit and 64-bit modes.::
arch -i386 /usr/local/bin/pythonn.n -m test.regrtest -w -u all /usr/local/bin/pythonn.n -m test -w -u all,-largefile
arch -X86_64 /usr/local/bin/pythonn.n -m test.regrtest -w -u all /usr/local/bin/pythonn.n-32 -m test -w -u all
Certain tests will be skipped and some cause the interpreter to fail Certain tests will be skipped and some cause the interpreter to fail
which will likely generate ``Python quit unexpectedly`` alert messages which will likely generate ``Python quit unexpectedly`` alert messages
to be generated at several points during a test run. These can to be generated at several points during a test run. These are normal
be ignored. during testing and can be ignored.
It is also recommend to launch IDLE and verify that it is at least
functional. Double-click on the IDLE app icon in ``/Applications/Pythonn.n``.
It should also be tested from the command line::
/usr/local/bin/idlen.n
This diff is collapsed.
diff -r -u ncurses-5.5-orig/test/Makefile.in ncurses-5.5/test/Makefile.in
--- ncurses-5.5-orig/test/Makefile.in 2006-03-24 12:47:40.000000000 +0100
+++ ncurses-5.5/test/Makefile.in 2006-03-24 12:47:50.000000000 +0100
@@ -75,7 +75,7 @@
MATH_LIB = @MATH_LIB@
LD = @LD@
-LINK = @LINK_TESTS@ $(LIBTOOL_LINK) $(CC) $(CFLAGS)
+LINK = @LINK_TESTS@ $(LIBTOOL_LINK) $(CC)
usFLAGS = @LD_MODEL@ @LOCAL_LDFLAGS@ @LDFLAGS@
diff -ru ncurses-5.5-orig/ncurses/tinfo/read_entry.c ncurses-5.5/ncurses/tinfo/read_entry.c
--- ncurses-5.5-orig/ncurses/tinfo/read_entry.c 2004-01-11 02:57:05.000000000 +0100
+++ ncurses-5.5/ncurses/tinfo/read_entry.c 2006-03-25 22:49:39.000000000 +0100
@@ -474,7 +474,7 @@
}
/* truncate the terminal name to prevent buffer overflow */
- (void) sprintf(ttn, "%c/%.*s", *tn, (int) sizeof(ttn) - 3, tn);
+ (void) sprintf(ttn, "%x/%.*s", *tn, (int) sizeof(ttn) - 3, tn);
/* This is System V behavior, in conjunction with our requirements for
* writing terminfo entries.
diff -ru ncurses-5.5-orig/configure ncurses-5.5/configure
--- ncurses-5.5-orig/configure 2005-09-24 23:50:50.000000000 +0200
+++ ncurses-5.5/configure 2006-03-26 22:24:59.000000000 +0200
@@ -5027,7 +5027,7 @@
darwin*)
EXTRA_CFLAGS="-no-cpp-precomp"
CC_SHARED_OPTS="-dynamic"
- MK_SHARED_LIB='$(CC) -dynamiclib -install_name $(DESTDIR)$(libdir)/`basename $@` -compatibility_version $(ABI_VERSION) -current_version $(ABI_VERSION) -o $@'
+ MK_SHARED_LIB='$(CC) $(CFLAGS) -dynamiclib -install_name $(DESTDIR)$(libdir)/`basename $@` -compatibility_version $(ABI_VERSION) -current_version $(ABI_VERSION) -o $@'
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
cf_cv_shlib_version_infix=yes
;;
...@@ -5,8 +5,15 @@ $ARCHITECTURES. ...@@ -5,8 +5,15 @@ $ARCHITECTURES.
Installation requires approximately $INSTALL_SIZE MB of disk space, Installation requires approximately $INSTALL_SIZE MB of disk space,
ignore the message that it will take zero bytes. ignore the message that it will take zero bytes.
You must install onto your current boot disk, even though the If you are attempting to install on an OS X 10.8 system, you may
installer does not enforce this, otherwise things will not work. see a message that Python can't be installed because it is from an
unidentified developer. This is because this Python installer
package is not yet compatible with the Gatekeeper security feature
introduced in OS X 10.8. To allow Python to be installed, you
can override the Gatekeeper policy for this install. In the Finder,
instead of double-clicking, control-click or right click the "Python"
installer package icon. Then select "Open using ... Installer" from
the contextual menu that appears.
Python consists of the Python programming language interpreter, plus Python consists of the Python programming language interpreter, plus
a set of programs to allow easy access to it for Mac users including a set of programs to allow easy access to it for Mac users including
...@@ -16,15 +23,16 @@ Python programs. ...@@ -16,15 +23,16 @@ Python programs.
**** IMPORTANT **** **** IMPORTANT ****
Before using IDLE or other programs using the tkinter graphical user To use IDLE or other programs that use the tkinter graphical user
interface toolkit, visit http://www.python.org/download/mac/tcltk/ interface toolkit, you may need to install a third-party version of
for current information about supported and recommended versions the Tcl/Tk frameworks. Visit http://www.python.org/download/mac/tcltk/
of Tcl/Tk for this version of Python and Mac OS X. for current information about supported and recommended versions of
Tcl/Tk for this version of Python and of Mac OS X.
******************* *******************
The installer puts applications, an "Update Shell Profile" command, The installer puts applications, an "Update Shell Profile" command,
and an Extras folder containing demo programs and tools into the and a link to the optionally installed Python Documentation into the
"Python $VERSION" subfolder of the system Applications folder, "Python $VERSION" subfolder of the system Applications folder,
and puts the underlying machinery into the folder and puts the underlying machinery into the folder
$PYTHONFRAMEWORKINSTALLDIR. It can $PYTHONFRAMEWORKINSTALLDIR. It can
...@@ -32,5 +40,13 @@ optionally place links to the command-line tools in /usr/local/bin as ...@@ -32,5 +40,13 @@ optionally place links to the command-line tools in /usr/local/bin as
well. Double-click on the "Update Shell Profile" command to add the well. Double-click on the "Update Shell Profile" command to add the
"bin" directory inside the framework to your shell's search path. "bin" directory inside the framework to your shell's search path.
You must install onto your current boot disk, even though the
installer does not enforce this, otherwise things will not work.
You can verify the integrity of the disk image file containing the
installer package and this ReadMe file by comparing its md5 checksum
and size with the values published on the release page linked at
http://www.python.org/download/
More information on Python in general can be found at More information on Python in general can be found at
http://www.python.org. http://www.python.org.
...@@ -5,19 +5,10 @@ FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}" ...@@ -5,19 +5,10 @@ FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}"
FWK_DOCDIR_SUBPATH="Resources/English.lproj/Documentation" FWK_DOCDIR_SUBPATH="Resources/English.lproj/Documentation"
FWK_DOCDIR="${FWK}/${FWK_DOCDIR_SUBPATH}" FWK_DOCDIR="${FWK}/${FWK_DOCDIR_SUBPATH}"
APPDIR="/Applications/Python ${PYVER}" APPDIR="/Applications/Python ${PYVER}"
DEV_DOCDIR="/Developer/Documentation"
SHARE_DIR="${FWK}/share" SHARE_DIR="${FWK}/share"
SHARE_DOCDIR="${SHARE_DIR}/doc/python${PYVER}" SHARE_DOCDIR="${SHARE_DIR}/doc/python${PYVER}"
SHARE_DOCDIR_TO_FWK="../../.." SHARE_DOCDIR_TO_FWK="../../.."
# make link in /Developer/Documentation/ for Xcode users
if [ -d "${DEV_DOCDIR}" ]; then
if [ ! -d "${DEV_DOCDIR}/Python" ]; then
mkdir -p "${DEV_DOCDIR}/Python"
fi
ln -fhs "${FWK_DOCDIR}" "${DEV_DOCDIR}/Python/Reference Documentation ${PYVER}"
fi
# make link in /Applications/Python m.n/ for Finder users # make link in /Applications/Python m.n/ for Finder users
if [ -d "${APPDIR}" ]; then if [ -d "${APPDIR}" ]; then
ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html" ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html"
......
...@@ -8,14 +8,24 @@ FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@" ...@@ -8,14 +8,24 @@ FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@"
"${FWK}/bin/python@PYVER@" -Wi -tt \ "${FWK}/bin/python@PYVER@" -Wi -tt \
"${FWK}/lib/python${PYVER}/compileall.py" \ "${FWK}/lib/python${PYVER}/compileall.py" \
-x badsyntax -x site-packages \ -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
"${FWK}/lib/python${PYVER}" "${FWK}/lib/python${PYVER}"
"${FWK}/bin/python@PYVER@" -Wi -tt -O \ "${FWK}/bin/python@PYVER@" -Wi -tt -O \
"${FWK}/lib/python${PYVER}/compileall.py" \ "${FWK}/lib/python${PYVER}/compileall.py" \
-x badsyntax -x site-packages \ -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
"${FWK}/lib/python${PYVER}" "${FWK}/lib/python${PYVER}"
"${FWK}/bin/python@PYVER@" -Wi \
"${FWK}/lib/python${PYVER}/compileall.py" \
-f -x badsyntax \
"${FWK}/lib/python${PYVER}/site-packages"
"${FWK}/bin/python@PYVER@" -Wi -O \
"${FWK}/lib/python${PYVER}/compileall.py" \
-f -x badsyntax \
"${FWK}/lib/python${PYVER}/site-packages"
chgrp -R admin "${FWK}" chgrp -R admin "${FWK}"
chmod -R g+w "${FWK}" chmod -R g+w "${FWK}"
......
...@@ -38,10 +38,10 @@ INSTALL_SCRIPT= @INSTALL_SCRIPT@ ...@@ -38,10 +38,10 @@ INSTALL_SCRIPT= @INSTALL_SCRIPT@
INSTALL_DATA=@INSTALL_DATA@ INSTALL_DATA=@INSTALL_DATA@
LN=@LN@ LN=@LN@
STRIPFLAG=-s STRIPFLAG=-s
CPMAC=/Developer/Tools/CpMac CPMAC=CpMac
APPTEMPLATE=$(srcdir)/Resources/app APPTEMPLATE=$(srcdir)/Resources/app
APPSUBDIRS=MacOS Resources APPSUBDIRS=MacOS Resources
CACHERSRC=$(srcdir)/scripts/cachersrc.py CACHERSRC=$(srcdir)/scripts/cachersrc.py
compileall=$(srcdir)/../Lib/compileall.py compileall=$(srcdir)/../Lib/compileall.py
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment