Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(10)

Delta Between Two Patch Sets: Mac/README

Issue 15550: Trailing white spaces
Left Patch Set: Created 7 years, 6 months ago
Right Patch Set: Created 7 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « Mac/PythonLauncher/PreferencesWindowController.m ('k') | Misc/gdbinit » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 ========================= 1 =========================
2 Python on Mac OS X README 2 Python on Mac OS X README
3 ========================= 3 =========================
4 4
5 :Authors: 5 :Authors:
6 Jack Jansen (2004-07), 6 Jack Jansen (2004-07),
7 Ronald Oussoren (2010-04), 7 Ronald Oussoren (2010-04),
8 Ned Deily (2012-06) 8 Ned Deily (2012-06)
9 9
10 :Version: 3.3.0 10 :Version: 3.3.0
11 11
12 This document provides a quick overview of some Mac OS X specific features in 12 This document provides a quick overview of some Mac OS X specific features in
13 the Python distribution. 13 the Python distribution.
14 14
15 * ``--enable-framework[=DIR]`` 15 * ``--enable-framework[=DIR]``
16 16
17 If this argument is specified the build will create a Python.framework rather 17 If this argument is specified the build will create a Python.framework rather
18 than a traditional Unix install. See the section 18 than a traditional Unix install. See the section
19 _`Building and using a framework-based Python on Mac OS X` for more 19 _`Building and using a framework-based Python on Mac OS X` for more
20 information on frameworks. 20 information on frameworks.
21 21
22 If the optional directory argument is specified the framework is installed 22 If the optional directory argument is specified the framework is installed
23 into that directory. This can be used to install a python framework into 23 into that directory. This can be used to install a python framework into
24 your home directory:: 24 your home directory::
25 25
26 $ ./configure --enable-framework=/Users/ronald/Library/Frameworks 26 $ ./configure --enable-framework=/Users/ronald/Library/Frameworks
27 $ make && make install 27 $ make && make install
28 28
29 This will install the framework itself in ``/Users/ronald/Library/Frameworks`` , 29 This will install the framework itself in ``/Users/ronald/Library/Frameworks`` ,
(...skipping 13 matching lines...) Expand all
43 The optional argument specifies which OS X SDK should be used to perform the 43 The optional argument specifies which OS X SDK should be used to perform the
44 build. If xcodebuild is available and configured, this defaults to 44 build. If xcodebuild is available and configured, this defaults to
45 the Xcode default MacOS X SDK, otherwise ``/Developer/SDKs/MacOSX.10.4u.sdk`` 45 the Xcode default MacOS X SDK, otherwise ``/Developer/SDKs/MacOSX.10.4u.sdk``
46 if available or ``/`` if not. 46 if available or ``/`` if not.
47 47
48 See the section _`Building and using a universal binary of Python on Mac OS X` 48 See the section _`Building and using a universal binary of Python on Mac OS X`
49 for more information. 49 for more information.
50 50
51 * ``--with-univeral-archs=VALUE`` 51 * ``--with-univeral-archs=VALUE``
52 52
53 Specify the kind of universal binary that should be created. This option is 53 Specify the kind of universal binary that should be created. This option is
54 only valid when ``--enable-universalsdk`` is specified. The default is 54 only valid when ``--enable-universalsdk`` is specified. The default is
55 ``32-bit`` if a building with a SDK that supports PPC, otherwise defaults 55 ``32-bit`` if a building with a SDK that supports PPC, otherwise defaults
56 to ``intel``. 56 to ``intel``.
57 57
58 58
59 Building and using a universal binary of Python on Mac OS X 59 Building and using a universal binary of Python on Mac OS X
60 =========================================================== 60 ===========================================================
61 61
62 1. What is a universal binary 62 1. What is a universal binary
63 ----------------------------- 63 -----------------------------
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 real interpreter runs with the same architecture. 146 real interpreter runs with the same architecture.
147 147
148 Building and using a framework-based Python on Mac OS X. 148 Building and using a framework-based Python on Mac OS X.
149 ======================================================== 149 ========================================================
150 150
151 151
152 1. Why would I want a framework Python instead of a normal static Python? 152 1. Why would I want a framework Python instead of a normal static Python?
153 -------------------------------------------------------------------------- 153 --------------------------------------------------------------------------
154 154
155 The main reason is because you want to create GUI programs in Python. With the 155 The main reason is because you want to create GUI programs in Python. With the
156 exception of X11/XDarwin-based GUI toolkits all GUI programs need to be run 156 exception of X11/XDarwin-based GUI toolkits all GUI programs need to be run
157 from a Mac OSX application bundle (".app"). 157 from a Mac OSX application bundle (".app").
158 158
159 While it is technically possible to create a .app without using frameworks you 159 While it is technically possible to create a .app without using frameworks you
160 will have to do the work yourself if you really want this. 160 will have to do the work yourself if you really want this.
161 161
162 A second reason for using frameworks is that they put Python-related items in 162 A second reason for using frameworks is that they put Python-related items in
163 only two places: "/Library/Framework/Python.framework" and 163 only two places: "/Library/Framework/Python.framework" and
164 "/Applications/Python <VERSION>" where ``<VERSION>`` can be e.g. "3.3", 164 "/Applications/Python <VERSION>" where ``<VERSION>`` can be e.g. "3.3",
165 "2.7", etc. This simplifies matters for users installing 165 "2.7", etc. This simplifies matters for users installing
166 Python from a binary distribution if they want to get rid of it again. Moreover, 166 Python from a binary distribution if they want to get rid of it again. Moreover,
167 due to the way frameworks work, a user without admin privileges can install a 167 due to the way frameworks work, a user without admin privileges can install a
168 binary distribution in his or her home directory without recompilation. 168 binary distribution in his or her home directory without recompilation.
169 169
170 2. How does a framework Python differ from a normal static Python? 170 2. How does a framework Python differ from a normal static Python?
171 ------------------------------------------------------------------ 171 ------------------------------------------------------------------
172 172
173 In everyday use there is no difference, except that things are stored in 173 In everyday use there is no difference, except that things are stored in
174 a different place. If you look in /Library/Frameworks/Python.framework 174 a different place. If you look in /Library/Frameworks/Python.framework
175 you will see lots of relative symlinks, see the Apple documentation for 175 you will see lots of relative symlinks, see the Apple documentation for
176 details. If you are used to a normal unix Python file layout go down to 176 details. If you are used to a normal unix Python file layout go down to
177 Versions/Current and you will see the familiar bin and lib directories. 177 Versions/Current and you will see the familiar bin and lib directories.
178 178
179 3. Do I need extra packages? 179 3. Do I need extra packages?
180 ---------------------------- 180 ----------------------------
181 181
182 Yes, probably. If you want Tkinter support you need to get the OSX AquaTk 182 Yes, probably. If you want Tkinter support you need to get the OSX AquaTk
183 distribution, this is installed by default on Mac OS X 10.4 or later. If 183 distribution, this is installed by default on Mac OS X 10.4 or later. If
184 you want wxPython you need to get that. If you want Cocoa you need to get 184 you want wxPython you need to get that. If you want Cocoa you need to get
185 PyObjC. 185 PyObjC.
186 186
187 4. How do I build a framework Python? 187 4. How do I build a framework Python?
188 ------------------------------------- 188 -------------------------------------
189 189
190 This directory contains a Makefile that will create a couple of python-related 190 This directory contains a Makefile that will create a couple of python-related
191 applications (full-blown OSX .app applications, that is) in 191 applications (full-blown OSX .app applications, that is) in
192 "/Applications/Python <VERSION>", and a hidden helper application Python.app 192 "/Applications/Python <VERSION>", and a hidden helper application Python.app
193 inside the Python.framework, and unix tools "python" and "pythonw" into 193 inside the Python.framework, and unix tools "python" and "pythonw" into
194 /usr/local/bin. In addition it has a target "installmacsubtree" that installs 194 /usr/local/bin. In addition it has a target "installmacsubtree" that installs
195 the relevant portions of the Mac subtree into the Python.framework. 195 the relevant portions of the Mac subtree into the Python.framework.
196 196
197 It is normally invoked indirectly through the main Makefile, as the last step 197 It is normally invoked indirectly through the main Makefile, as the last step
198 in the sequence 198 in the sequence
199 199
200 1. ./configure --enable-framework 200 1. ./configure --enable-framework
201 201
202 2. make 202 2. make
203 203
204 3. make install 204 3. make install
205 205
206 This sequence will put the framework in ``/Library/Framework/Python.framework``, 206 This sequence will put the framework in ``/Library/Framework/Python.framework``,
207 the applications in ``/Applications/Python <VERSION>`` and the unix tools in 207 the applications in ``/Applications/Python <VERSION>`` and the unix tools in
208 ``/usr/local/bin``. 208 ``/usr/local/bin``.
209 209
210 Installing in another place, for instance ``$HOME/Library/Frameworks`` if you 210 Installing in another place, for instance ``$HOME/Library/Frameworks`` if you
211 have no admin privileges on your machine, is possible. This can be accomplished 211 have no admin privileges on your machine, is possible. This can be accomplished
212 by configuring with ``--enable-framework=$HOME/Library/Frameworks``. 212 by configuring with ``--enable-framework=$HOME/Library/Frameworks``.
213 The other two directories will then also be installed in your home directory, 213 The other two directories will then also be installed in your home directory,
214 at ``$HOME/Applications/Python-<VERSION>`` and ``$HOME/bin``. 214 at ``$HOME/Applications/Python-<VERSION>`` and ``$HOME/bin``.
215 215
216 If you want to install some part, but not all, read the main Makefile. The 216 If you want to install some part, but not all, read the main Makefile. The
217 frameworkinstall is composed of a couple of sub-targets that install the 217 frameworkinstall is composed of a couple of sub-targets that install the
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 However, the Python build process itself has several build dependencies not 259 However, the Python build process itself has several build dependencies not
260 available out of the box with OS X 10.4 so you may have to install 260 available out of the box with OS X 10.4 so you may have to install
261 additional software beyond what is provided with Xcode 2. OS X 10.5 261 additional software beyond what is provided with Xcode 2. OS X 10.5
262 provides a recent enough system Python (in ``/usr/bin``) to build 262 provides a recent enough system Python (in ``/usr/bin``) to build
263 the Python documentation set. 263 the Python documentation set.
264 264
265 All of this is normally done completely isolated in /tmp/_py, so it does not 265 All of this is normally done completely isolated in /tmp/_py, so it does not
266 use your normal build directory nor does it install into /. 266 use your normal build directory nor does it install into /.
267 267
268 Because of the way the script locates the files it needs you have to run it 268 Because of the way the script locates the files it needs you have to run it
269 from within the BuildScript directory. The script accepts a number of 269 from within the BuildScript directory. The script accepts a number of
270 command-line arguments, run it with --help for more information. 270 command-line arguments, run it with --help for more information.
271 271
272 Configure warnings 272 Configure warnings
273 ================== 273 ==================
274 274
275 The configure script sometimes emits warnings like the one below:: 275 The configure script sometimes emits warnings like the one below::
276 276
277 configure: WARNING: libintl.h: present but cannot be compiled 277 configure: WARNING: libintl.h: present but cannot be compiled
278 configure: WARNING: libintl.h: check for missing prerequisite headers? 278 configure: WARNING: libintl.h: check for missing prerequisite headers?
279 configure: WARNING: libintl.h: see the Autoconf documentation 279 configure: WARNING: libintl.h: see the Autoconf documentation
280 configure: WARNING: libintl.h: section "Present But Cannot Be Compiled" 280 configure: WARNING: libintl.h: section "Present But Cannot Be Compiled"
281 configure: WARNING: libintl.h: proceeding with the preprocessor's result 281 configure: WARNING: libintl.h: proceeding with the preprocessor's result
282 configure: WARNING: libintl.h: in the future, the compiler will take preceden ce 282 configure: WARNING: libintl.h: in the future, the compiler will take preceden ce
283 configure: WARNING: ## -------------------------------------- ## 283 configure: WARNING: ## -------------------------------------- ##
284 configure: WARNING: ## Report this to http://bugs.python.org/ ## 284 configure: WARNING: ## Report this to http://bugs.python.org/ ##
285 configure: WARNING: ## -------------------------------------- ## 285 configure: WARNING: ## -------------------------------------- ##
286 286
287 This almost always means you are trying to build a universal binary for 287 This almost always means you are trying to build a universal binary for
288 Python and have libaries in ``/usr/local`` that don't contain the required 288 Python and have libaries in ``/usr/local`` that don't contain the required
289 architectures. Temporarily move ``/usr/local`` aside to finish the build. 289 architectures. Temporarily move ``/usr/local`` aside to finish the build.
290 290
291 291
(...skipping 18 matching lines...) Expand all
310 310
311 311
312 Resources 312 Resources
313 ========= 313 =========
314 314
315 * http://www.python.org/download/mac/ 315 * http://www.python.org/download/mac/
316 316
317 * http://www.python.org/community/sigs/current/pythonmac-sig/ 317 * http://www.python.org/community/sigs/current/pythonmac-sig/
318 318
319 * http://docs.python.org/devguide/ 319 * http://docs.python.org/devguide/
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+