Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e1c97949
Commit
e1c97949
authored
Jan 29, 2013
by
Ned Deily
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #14018: Backport OS X installer updates from 3.3.
parent
8d15ca3c
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
408 additions
and
277 deletions
+408
-277
Mac/BuildScript/README.txt
Mac/BuildScript/README.txt
+57
-31
Mac/BuildScript/build-installer.py
Mac/BuildScript/build-installer.py
+314
-190
Mac/BuildScript/ncurses-5.5.patch
Mac/BuildScript/ncurses-5.5.patch
+0
-36
Mac/BuildScript/resources/ReadMe.txt
Mac/BuildScript/resources/ReadMe.txt
+23
-7
Mac/BuildScript/scripts/postflight.documentation
Mac/BuildScript/scripts/postflight.documentation
+0
-9
Mac/BuildScript/scripts/postflight.framework
Mac/BuildScript/scripts/postflight.framework
+12
-2
Mac/Makefile.in
Mac/Makefile.in
+2
-2
No files found.
Mac/BuildScript/README.txt
View file @
e1c97949
...
...
@@ -8,51 +8,56 @@ $DESTROOT, massages that installation to remove .pyc files and such, creates
an Installer package from the installation plus other files in ``resources``
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 each release
:
For Python 2.7.x and 3.2.x
, PSF practice is to build two installer variants
for each release
.
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 \
--universal-archs=32-bit \
--dep-target=10.3
# These are the current default options
- builds the following third-party libraries
* Bzip2
* Zlib 1.2.3
* GNU Readline (GPL)
* SQLite 3
* NCurses
* GNU Readline (GPL)
* SQLite 3.7.13
* Zlib 1.2.3
* Oracle Sleepycat DB 4.8 (Python 2.x only)
- 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
* Xcode 3.1.4
(or later)
* Xcode 3.1.4
* ``MacOSX10.4u`` SDK (later SDKs do not support PPC G3 processors)
* ``MACOSX_DEPLOYMENT_TARGET=10.3``
* 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:
* Mac OS X 10.4.11 with Xcode 2.5
* Mac OS X 10.6.6 with Xcode 3.2.5
* Mac OS X 10.6.8 with Xcode 3.2.6
- 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)::
python build-installer.py \
/usr/bin/
python build-installer.py \
--sdk-path=/Developer/SDKs/MacOSX10.6.sdk \
--universal-archs=intel \
--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
* readline module links with Apple BSD editline (libedit)
...
...
@@ -60,18 +65,27 @@ for each release:
- 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)
* Xcode 3.2.
5 (or later)
* Mac OS X 10.6.
8
(or later)
* Xcode 3.2.
6
* ``MacOSX10.6`` SDK
* ``MACOSX_DEPLOYMENT_TARGET=10.6``
* 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:
* 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
...
...
@@ -87,6 +101,11 @@ General Prerequisites
* It is safest to start each variant build with an empty source directory
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
----------
...
...
@@ -107,9 +126,9 @@ Building other universal installers
...................................
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
--universal-archs=all
--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
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
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``),
and ``3-way`` (``ppc``, ``i386``, ``x86_64``). None of these options
...
...
@@ -133,15 +153,21 @@ Testing
Ideally, the resulting binaries should be installed and the test suite run
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
a
t least one Intel, one PPC G4, and one PPC G3 system and one each of
OS X 10.6, 10.5, 10.4, and 10.3.9. Not all tests run on 10.3.9.
Variant 2 should be run on 10.6
in both 32-bit and 64-bit modes.::
a
PPC G4 system with OS X 10.5 and at least one Intel system running OS X
10.8, 10.7, 10.6, or 10.5. Variant 2 should be run on 10.8, 10.7, and 10.6
systems
in both 32-bit and 64-bit modes.::
arch -i386 /usr/local/bin/pythonn.n -m test.regrtest -w -u all
arch -X86_64 /usr/local/bin/pythonn.n -m test.regr
test -w -u all
/usr/local/bin/pythonn.n -m test -w -u all,-largefile
/usr/local/bin/pythonn.n-32 -m
test -w -u all
Certain tests will be skipped and some cause the interpreter to fail
which will likely generate ``Python quit unexpectedly`` alert messages
to be generated at several points during a test run. These can
be ignored.
to be generated at several points during a test run. These are normal
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
Mac/BuildScript/build-installer.py
View file @
e1c97949
This diff is collapsed.
Click to expand it.
Mac/BuildScript/ncurses-5.5.patch
deleted
100644 → 0
View file @
8d15ca3c
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
;;
Mac/BuildScript/resources/ReadMe.txt
View file @
e1c97949
...
...
@@ -5,8 +5,15 @@ $ARCHITECTURES.
Installation requires approximately $INSTALL_SIZE MB of disk space,
ignore the message that it will take zero bytes.
You must install onto your current boot disk, even though the
installer does not enforce this, otherwise things will not work.
If you are attempting to install on an OS X 10.8 system, you may
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
a set of programs to allow easy access to it for Mac users including
...
...
@@ -16,15 +23,16 @@ Python programs.
**** IMPORTANT ****
Before using IDLE or other programs using the tkinter graphical user
interface toolkit, visit http://www.python.org/download/mac/tcltk/
for current information about supported and recommended versions
of Tcl/Tk for this version of Python and Mac OS X.
To use IDLE or other programs that use the tkinter graphical user
interface toolkit, you may need to install a third-party version of
the Tcl/Tk frameworks. Visit http://www.python.org/download/mac/tcltk/
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,
and a
n 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,
and puts the underlying machinery into the folder
$PYTHONFRAMEWORKINSTALLDIR. It can
...
...
@@ -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
"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
http://www.python.org.
Mac/BuildScript/scripts/postflight.documentation
View file @
e1c97949
...
...
@@ -5,19 +5,10 @@ FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}"
FWK_DOCDIR_SUBPATH
=
"Resources/English.lproj/Documentation"
FWK_DOCDIR
=
"
${
FWK
}
/
${
FWK_DOCDIR_SUBPATH
}
"
APPDIR
=
"/Applications/Python
${
PYVER
}
"
DEV_DOCDIR
=
"/Developer/Documentation"
SHARE_DIR
=
"
${
FWK
}
/share"
SHARE_DOCDIR
=
"
${
SHARE_DIR
}
/doc/python
${
PYVER
}
"
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
if
[
-d
"
${
APPDIR
}
"
]
;
then
ln
-fhs
"
${
FWK_DOCDIR
}
/index.html"
"
${
APPDIR
}
/Python Documentation.html"
...
...
Mac/BuildScript/scripts/postflight.framework
View file @
e1c97949
...
...
@@ -8,14 +8,24 @@ FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@"
"
${
FWK
}
/bin/python@PYVER@"
-Wi
-tt
\
"
${
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
}
/bin/python@PYVER@"
-Wi
-tt
-O
\
"
${
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
}
/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
}
"
chmod
-R
g+w
"
${
FWK
}
"
...
...
Mac/Makefile.in
View file @
e1c97949
...
...
@@ -38,7 +38,7 @@ INSTALL_SCRIPT= @INSTALL_SCRIPT@
INSTALL_DATA
=
@INSTALL_DATA@
LN
=
@LN@
STRIPFLAG
=
-s
CPMAC
=
/Developer/Tools/
CpMac
CPMAC
=
CpMac
APPTEMPLATE
=
$(srcdir)
/Resources/app
APPSUBDIRS
=
MacOS Resources
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment