annotate Mac/README @ 58925:eecf1bef052d 2.6

Merged revisions 78207 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78207 | ezio.melotti | 2010-02-17 01:26:09 +0200 (Wed, 17 Feb 2010) | 1 line #7930: fix stripid ........
author Ezio Melotti <ezio.melotti@gmail.com>
date Tue, 16 Feb 2010 23:29:44 +0000
parents 986709c24531
children e2762f495393 aaeb65bab3c0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
1 ============
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
2 MacOSX Notes
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
3 ============
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
4
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
5 This document provides a quick overview of some Mac OS X specific features in
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
6 the Python distribution.
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
7
56283
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
8 Mac-specific arguments to configure
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
9 ===================================
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
10
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
11 * ``--enable-framework``
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
12
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
13 If this argument is specified the build will create a Python.framework rather
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
14 than a traditional Unix install. See the section
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
15 _`Building and using a framework-based Python on Mac OS X` for more
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
16 information on frameworks.
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
17
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
18 * ``--with-framework-name=NAME``
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
19
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
20 Specify the name for the python framework, defaults to ``Python``. This option
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
21 is only valid when ``--enable-framework`` is specified.
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
22
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
23 * ``--enable-universalsdk[=PATH]``
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
24
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
25 Create a universal binary build of of Python. This can be used with both
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
26 regular and framework builds.
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
27
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
28 The optional argument specifies with OSX SDK should be used to perform the
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
29 build. This defaults to ``/Developer/SDKs/MacOSX.10.4u.sdk``, specify
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
30 ``/`` when building on a 10.5 system, especially when building 64-bit code.
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
31
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
32 See the section _`Building and using a universal binary of Python on Mac OS X`
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
33 for more information.
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
34
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
35 * ``--with-univeral-archs=VALUE``
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
36
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
37 Specify the kind of universal binary that should be created. This option is
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
38 only valid when ``--enable-universalsdk`` is specified.
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
39
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
40
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
41
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
42 Building and using a universal binary of Python on Mac OS X
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
43 ===========================================================
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
44
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
45 1. What is a universal binary
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
46 -----------------------------
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
47
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
48 A universal binary build of Python contains object code for both PPC and i386
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
49 and can therefore run at native speed on both classic powerpc based macs and
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
50 the newer intel based macs.
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
51
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
52 2. How do I build a universal binary
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
53 ------------------------------------
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
54
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
55 You can enable universal binaries by specifying the "--enable-universalsdk"
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
56 flag to configure::
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
57
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
58 $ ./configure --enable-universalsdk
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
59 $ make
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
60 $ make install
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
61
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
62 This flag can be used a framework build of python, but also with a classic
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
63 unix build. Either way you will have to build python on Mac OS X 10.4 (or later)
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
64 with Xcode 2.1 (or later). You also have to install the 10.4u SDK when
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
65 installing Xcode.
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
66
56283
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
67 The option ``--enable-universalsdk`` has an optional argument to specify an
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
68 SDK, which defaults to the 10.4u SDK. When you build on OSX 10.5 or later
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
69 you can use the system headers instead of an SDK::
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
70
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
71 $ ./configure --enable-universalsdk=/
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
72
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
73 2.1 Flavours of universal binaries
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
74 ..................................
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
75
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
76 It is possible to build a number of flavours of the universal binary build,
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
77 the default is a 32-bit only binary (i386 and ppc). The flavour can be
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
78 specified using the option ``--with-universal-archs=VALUE``. The following
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
79 values are available:
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
80
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
81 * ``32-bit``: ``ppc``, ``i386``
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
82
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
83 * ``64-bit``: ``ppc64``, ``x86_64``
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
84
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
85 * ``all``: ``ppc``, ``ppc64``, ``i386``, ``x86_64``
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
86
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
87 * ``3-way``: ``ppc``, ``i386`` and ``x86_64``
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
88
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
89 * ``intel``: ``i386``, ``x86_64``
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
90
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
91 To build a universal binary that includes a 64-bit architecture you must build
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
92 on a system running OSX 10.5 or later. The ``all`` flavour can only be build on
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
93 OSX 10.5.
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
94
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
95
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
96 Building and using a framework-based Python on Mac OS X.
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
97 ========================================================
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
98
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
99
34112
1d04936a6456 Very minor grammatical fix and removal of a tab.
Brett Cannon <bcannon@gmail.com>
parents: 32700
diff changeset
100 1. Why would I want a framework Python instead of a normal static Python?
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
101 --------------------------------------------------------------------------
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
102
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
103 The main reason is because you want to create GUI programs in Python. With the
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
104 exception of X11/XDarwin-based GUI toolkits all GUI programs need to be run
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
105 from a fullblown MacOSX application (a ".app" bundle).
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
106
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
107 While it is technically possible to create a .app without using frameworks you
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
108 will have to do the work yourself if you really want this.
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
109
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
110 A second reason for using frameworks is that they put Python-related items in
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
111 only two places: "/Library/Framework/Python.framework" and
39798
1eebb647310f Fix a glaring error and update some version numbers.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38646
diff changeset
112 "/Applications/MacPython 2.6". This simplifies matters for users installing
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
113 Python from a binary distribution if they want to get rid of it again. Moreover,
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
114 due to the way frameworks work a user without admin privileges can install a
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
115 binary distribution in his or her home directory without recompilation.
29558
e5d3b1d89c40 Updated.
Jack Jansen <jack.jansen@cwi.nl>
parents: 25292
diff changeset
116
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
117 2. How does a framework Python differ from a normal static Python?
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
118 ------------------------------------------------------------------
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
119
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
120 In everyday use there is no difference, except that things are stored in
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
121 a different place. If you look in /Library/Frameworks/Python.framework
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
122 you will see lots of relative symlinks, see the Apple documentation for
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
123 details. If you are used to a normal unix Python file layout go down to
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
124 Versions/Current and you will see the familiar bin and lib directories.
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
125
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
126 3. Do I need extra packages?
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
127 ----------------------------
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
128
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
129 Yes, probably. If you want Tkinter support you need to get the OSX AquaTk
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
130 distribution, this is installed by default on Mac OS X 10.4 or later. If
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
131 you want wxPython you need to get that. If you want Cocoa you need to get
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
132 PyObjC.
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
133
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
134 4. How do I build a framework Python?
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
135 -------------------------------------
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
136
24480
03d85d197052 Added one call to Py_Main(), for OSX framework builds only, that will get the
Jack Jansen <jack.jansen@cwi.nl>
parents: 21323
diff changeset
137 This directory contains a Makefile that will create a couple of python-related
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
138 applications (fullblown OSX .app applications, that is) in
39798
1eebb647310f Fix a glaring error and update some version numbers.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38646
diff changeset
139 "/Applications/MacPython 2.6", and a hidden helper application Python.app
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
140 inside the Python.framework, and unix tools "python" and "pythonw" into
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
141 /usr/local/bin. In addition it has a target "installmacsubtree" that installs
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
142 the relevant portions of the Mac subtree into the Python.framework.
19774
c5523b0f89d5 Minimal instructions for using the Makefile here. Also a clear
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
143
24480
03d85d197052 Added one call to Py_Main(), for OSX framework builds only, that will get the
Jack Jansen <jack.jansen@cwi.nl>
parents: 21323
diff changeset
144 It is normally invoked indirectly through the main Makefile, as the last step
56283
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
145 in the sequence::
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
146
56283
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
147 $ ./configure --enable-framework
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
148 $ make
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
149 $ make install
24769
0afacf5dc42e Updated for the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24507
diff changeset
150
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
151 This sequence will put the framework in /Library/Framework/Python.framework,
39798
1eebb647310f Fix a glaring error and update some version numbers.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38646
diff changeset
152 the applications in "/Applications/MacPython 2.6" and the unix tools in
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
153 /usr/local/bin.
24769
0afacf5dc42e Updated for the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24507
diff changeset
154
56283
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
155 It is possible to select a different name for the framework using the configure
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
156 option ``--with-framework-name=NAME``. This makes it possible to have several
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
157 parallel installs of a Python framework.
986709c24531 Merged revisions 75131 via svnmerge from
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 39798
diff changeset
158
29558
e5d3b1d89c40 Updated.
Jack Jansen <jack.jansen@cwi.nl>
parents: 25292
diff changeset
159 Installing in another place, for instance $HOME/Library/Frameworks if you have
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
160 no admin privileges on your machine, has only been tested very lightly. This
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
161 can be done by configuring with --enable-framework=$HOME/Library/Frameworks.
39798
1eebb647310f Fix a glaring error and update some version numbers.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38646
diff changeset
162 The other two directories, "/Applications/MacPython-2.6" and /usr/local/bin,
1eebb647310f Fix a glaring error and update some version numbers.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38646
diff changeset
163 will then also be deposited in $HOME. This is sub-optimal for the unix tools,
1eebb647310f Fix a glaring error and update some version numbers.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38646
diff changeset
164 which you would want in $HOME/bin, but there is no easy way to fix this right
1eebb647310f Fix a glaring error and update some version numbers.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38646
diff changeset
165 now.
24769
0afacf5dc42e Updated for the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24507
diff changeset
166
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
167 What do all these programs do?
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
168 ===============================
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
169
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
170 "IDLE.app" is an integrated development environment for Python: editor,
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
171 debugger, etc.
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
172
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
173 "PythonLauncher.app" is a helper application that will handle things when you
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
174 double-click a .py, .pyc or .pyw file. For the first two it creates a Terminal
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
175 window and runs the scripts with the normal command-line Python. For the
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
176 latter it runs the script in the Python.app interpreter so the script can do
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
177 GUI-things. Keep the "alt" key depressed while dragging or double-clicking a
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
178 script to set runtime options. These options can be set once and for all
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
179 through PythonLauncher's preferences dialog.
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
180
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
181 "BuildApplet.app" creates an applet from a Python script. Drop the script on it
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
182 and out comes a full-featured MacOS application. There is much more to this,
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
183 to be supplied later. Some useful (but outdated) info can be found in
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
184 Mac/Demo.
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
185
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
186 The commandline scripts /usr/local/bin/python and pythonw can be used to run
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
187 non-GUI and GUI python scripts from the command line, respectively.
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
188
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
189 How do I create a binary distribution?
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
190 ======================================
25146
0e2366879289 Started on documentation for building a MacOSX binary installer.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24769
diff changeset
191
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
192 Go to the directory "Mac/OSX/BuildScript". There you'll find a script
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
193 "build-installer.py" that does all the work. This will download and build
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
194 a number of 3th-party libaries, configures and builds a framework Python,
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
195 installs it, creates the installer pacakge files and then packs this in a
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
196 DMG image.
32700
0729d1db5118 - Added a note about fixversions.py
Jack Jansen <jack.jansen@cwi.nl>
parents: 29558
diff changeset
197
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
198 The script will build a universal binary, you'll therefore have to run this
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
199 script on Mac OS X 10.4 or later and with Xcode 2.1 or later installed.
25146
0e2366879289 Started on documentation for building a MacOSX binary installer.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24769
diff changeset
200
29558
e5d3b1d89c40 Updated.
Jack Jansen <jack.jansen@cwi.nl>
parents: 25292
diff changeset
201 All of this is normally done completely isolated in /tmp/_py, so it does not
e5d3b1d89c40 Updated.
Jack Jansen <jack.jansen@cwi.nl>
parents: 25292
diff changeset
202 use your normal build directory nor does it install into /.
25146
0e2366879289 Started on documentation for building a MacOSX binary installer.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24769
diff changeset
203
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
204 Because of the way the script locates the files it needs you have to run it
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
205 from within the BuildScript directory. The script accepts a number of
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
206 command-line arguments, run it with --help for more information.
25146
0e2366879289 Started on documentation for building a MacOSX binary installer.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24769
diff changeset
207
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
208 Odds and ends
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
209 =============
19852
5e79bed3426f Added a note about making sure the Lac/Lib directory is in sys.path.
Jack Jansen <jack.jansen@cwi.nl>
parents: 19774
diff changeset
210
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
211 Something to take note of is that the ".rsrc" files in the distribution are
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
212 not actually resource files, they're AppleSingle encoded resource files. The
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
213 macresource module and the Mac/OSX/Makefile cater for this, and create
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
214 ".rsrc.df.rsrc" files on the fly that are normal datafork-based resource
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
215 files.
19774
c5523b0f89d5 Minimal instructions for using the Makefile here. Also a clear
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
216
34112
1d04936a6456 Very minor grammatical fix and removal of a tab.
Brett Cannon <bcannon@gmail.com>
parents: 32700
diff changeset
217 Jack Jansen, Jack.Jansen@cwi.nl, 15-Jul-2004.
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
218 Ronald Oussoren, RonaldOussoren@mac.com, 26-May-2006