annotate Mac/README @ 54294:dba767bc3155 legacy-trunk

remove mention of old ctypes version
author Benjamin Peterson <benjamin@python.org>
date Sat, 23 May 2009 20:59:09 +0000
parents 1eebb647310f
children 986709c24531
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
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
8
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
9 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
10 ===========================================================
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
11
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
12 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
13 -----------------------------
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
14
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
15 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
16 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
17 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
18
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
19 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
20 ------------------------------------
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
21
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
22 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
23 flag to configure::
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
24
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
25 $ ./configure --enable-universalsdk
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
26 $ make
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
27 $ make install
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
28
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
29 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
30 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
31 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
32 installing Xcode.
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
33
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
34
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
35 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
36 ========================================================
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
37
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
38
34112
1d04936a6456 Very minor grammatical fix and removal of a tab.
Brett Cannon <bcannon@gmail.com>
parents: 32700
diff changeset
39 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
40 --------------------------------------------------------------------------
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
41
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
42 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
43 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
44 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
45
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
46 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
47 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
48
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
49 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
50 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
51 "/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
52 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
53 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
54 binary distribution in his or her home directory without recompilation.
29558
e5d3b1d89c40 Updated.
Jack Jansen <jack.jansen@cwi.nl>
parents: 25292
diff changeset
55
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
56 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
57 ------------------------------------------------------------------
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
58
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
59 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
60 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
61 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
62 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
63 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
64
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
65 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
66 ----------------------------
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
67
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
68 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
69 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
70 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
71 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
72
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
73 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
74 -------------------------------------
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
75
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
76 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
77 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
78 "/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
79 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
80 /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
81 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
82
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
83 It is normally invoked indirectly through the main Makefile, as the last step
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
84 in the sequence
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
85
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
86 1. ./configure --enable-framework
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
87
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
88 2. make
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
89
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
90 3. make install
24769
0afacf5dc42e Updated for the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24507
diff changeset
91
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
92 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
93 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
94 /usr/local/bin.
24769
0afacf5dc42e Updated for the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24507
diff changeset
95
29558
e5d3b1d89c40 Updated.
Jack Jansen <jack.jansen@cwi.nl>
parents: 25292
diff changeset
96 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
97 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
98 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
99 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
100 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
101 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
102 now.
24769
0afacf5dc42e Updated for the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24507
diff changeset
103
0afacf5dc42e Updated for the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24507
diff changeset
104 If you want to install some part, but not all, read the main Makefile. The
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
105 frameworkinstall is composed of a couple of sub-targets that install the
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
106 framework itself, the Mac subtree, the applications and the unix tools.
24769
0afacf5dc42e Updated for the current state of affairs.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24507
diff changeset
107
29558
e5d3b1d89c40 Updated.
Jack Jansen <jack.jansen@cwi.nl>
parents: 25292
diff changeset
108 There is an extra target frameworkinstallextras that is not part of the
e5d3b1d89c40 Updated.
Jack Jansen <jack.jansen@cwi.nl>
parents: 25292
diff changeset
109 normal frameworkinstall which installs the Demo and Tools directories
39798
1eebb647310f Fix a glaring error and update some version numbers.
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38646
diff changeset
110 into "/Applications/MacPython 2.6", this is useful for binary distributions.
29558
e5d3b1d89c40 Updated.
Jack Jansen <jack.jansen@cwi.nl>
parents: 25292
diff changeset
111
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
112 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
113 ===============================
24507
dfe5a689979b Added a lot more information on framework builds, the various .app's,
Jack Jansen <jack.jansen@cwi.nl>
parents: 24480
diff changeset
114
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
115 "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
116 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
117
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
118 "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
119 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
120 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
121 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
122 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
123 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
124 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
125
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
126 "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
127 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
128 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
129 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
130
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
131 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
132 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
133
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
134 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
135 ======================================
25146
0e2366879289 Started on documentation for building a MacOSX binary installer.
Jack Jansen <jack.jansen@cwi.nl>
parents: 24769
diff changeset
136
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
137 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
138 "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
139 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
140 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
141 DMG image.
32700
0729d1db5118 - Added a note about fixversions.py
Jack Jansen <jack.jansen@cwi.nl>
parents: 29558
diff changeset
142
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
143 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
144 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
145
29558
e5d3b1d89c40 Updated.
Jack Jansen <jack.jansen@cwi.nl>
parents: 25292
diff changeset
146 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
147 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
148
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
149 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
150 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
151 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
152
38354
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
153 Odds and ends
957727f2ff09 - Remove previous version of the binary distribution script for OSX
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 34112
diff changeset
154 =============
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
155
25149
10f9888853cc Fixed a typo in the binary install notes
Jack Jansen <jack.jansen@cwi.nl>
parents: 25146
diff changeset
156 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
157 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
158 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
159 ".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
160 files.
19774
c5523b0f89d5 Minimal instructions for using the Makefile here. Also a clear
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
161
34112
1d04936a6456 Very minor grammatical fix and removal of a tab.
Brett Cannon <bcannon@gmail.com>
parents: 32700
diff changeset
162 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
163 Ronald Oussoren, RonaldOussoren@mac.com, 26-May-2006