Changeset 388 for python/vendor/current/Mac/README
- Timestamp:
- Mar 19, 2014, 11:11:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/vendor/current/Mac/README
r2 r388 9 9 =================================== 10 10 11 * ``--enable-framework ``11 * ``--enable-framework[=DIR]`` 12 12 13 13 If this argument is specified the build will create a Python.framework rather … … 16 16 information on frameworks. 17 17 18 If the optional directory argument is specified the framework it installed 19 into that directory. This can be used to install a python framework into 20 your home directory:: 21 22 $ configure --enable-framework=/Users/ronald/Library/Frameworks 23 $ make && make install 24 25 This will install the framework itself in ``/Users/ronald/Library/Frameworks``, 26 the applications in a subdirectory of ``/Users/ronald/Applications`` and the 27 command-line tools in ``/Users/ronald/bin``. 28 18 29 * ``--with-framework-name=NAME`` 19 30 … … 23 34 * ``--enable-universalsdk[=PATH]`` 24 35 25 Create a universal binary build of ofPython. This can be used with both36 Create a universal binary build of Python. This can be used with both 26 37 regular and framework builds. 27 38 28 The optional argument specifies w ith OSX SDK should be used to perform the39 The optional argument specifies which OSX SDK should be used to perform the 29 40 build. This defaults to ``/Developer/SDKs/MacOSX.10.4u.sdk``, specify 30 41 ``/`` when building on a 10.5 system, especially when building 64-bit code. … … 33 44 for more information. 34 45 35 * ``--with-univer sal-archs=VALUE``46 * ``--with-univeral-archs=VALUE`` 36 47 37 48 Specify the kind of universal binary that should be created. This option is … … 60 71 $ make install 61 72 62 This flag can be used a framework build of python, but also with a classic73 This flag can be used with a framework build of python, but also with a classic 63 74 unix build. Either way you will have to build python on Mac OS X 10.4 (or later) 64 75 with Xcode 2.1 (or later). You also have to install the 10.4u SDK when … … 89 100 * ``intel``: ``i386``, ``x86_64`` 90 101 91 To build a universal binary that includes a 64-bit architecture you must build92 on a system running OSX 10.5 or later. The ``all`` flavour can only be buil don102 To build a universal binary that includes a 64-bit architecture, you must build 103 on a system running OSX 10.5 or later. The ``all`` flavour can only be built on 93 104 OSX 10.5. 94 105 106 The makefile for a framework build will install ``python32`` and ``pythonw32`` 107 binaries when the universal architecures includes at least one 32-bit architecture 108 (that is, for all flavours but ``64-bit``). 109 110 Running a specific archicture 111 ............................. 112 113 You can run code using a specific architecture using the ``arch`` command:: 114 115 $ arch -i386 python 116 117 Or to explicitly run in 32-bit mode, regardless of the machine hardware:: 118 119 $ arch -i386 -ppc python 120 121 NOTE: When you're using a framework install of Python this requires at least 122 Python 2.7 or 3.2, in earlier versions the python (and pythonw) commands are 123 wrapper tools that execute the real interpreter without ensuring that the 124 real interpreter runs with the same architecture. 95 125 96 126 Building and using a framework-based Python on Mac OS X. … … 180 210 181 211 "BuildApplet.app" creates an applet from a Python script. Drop the script on it 182 and out comes a full-featured MacOS application. There is much more to this, 183 to be supplied later. Some useful (but outdated) info can be found in 184 Mac/Demo. 212 and out comes a full-featured MacOS application. BuildApplet.app is now 213 deprecated and has been removed in Python 3. As of OS X 10.8, Xcode 4 no 214 longer supplies the headers for the deprecated QuickDraw APIs used by 215 the EasyDialogs module making BuildApplet unusable as an app. It will 216 not be built by the Mac/Makefile in this case. 185 217 186 218 The commandline scripts /usr/local/bin/python and pythonw can be used to run … … 192 224 Go to the directory "Mac/OSX/BuildScript". There you'll find a script 193 225 "build-installer.py" that does all the work. This will download and build 194 a number of 3 th-party libaries, configures and builds a framework Python,195 installs it, creates the installer pac akge files and then packs this in a226 a number of 3rd-party libaries, configures and builds a framework Python, 227 installs it, creates the installer package files and then packs this in a 196 228 DMG image. 197 229 … … 205 237 from within the BuildScript directory. The script accepts a number of 206 238 command-line arguments, run it with --help for more information. 239 240 Configure warnings 241 ================== 242 243 The configure script sometimes emits warnings like the one below:: 244 245 configure: WARNING: libintl.h: present but cannot be compiled 246 configure: WARNING: libintl.h: check for missing prerequisite headers? 247 configure: WARNING: libintl.h: see the Autoconf documentation 248 configure: WARNING: libintl.h: section "Present But Cannot Be Compiled" 249 configure: WARNING: libintl.h: proceeding with the preprocessor's result 250 configure: WARNING: libintl.h: in the future, the compiler will take precedence 251 configure: WARNING: ## -------------------------------------- ## 252 configure: WARNING: ## Report this to http://bugs.python.org/ ## 253 configure: WARNING: ## -------------------------------------- ## 254 255 This almost always means you are trying to build a universal binary for 256 Python and have libaries in ``/usr/local`` that don't contain the required 257 architectures. Temporarily move ``/usr/local`` aside to finish the build. 258 259 260 Uninstalling a framework install, including the binary installer 261 ================================================================ 262 263 Uninstalling a framework can be done by manually removing all bits that got installed. 264 That's true for both installations from source and installations using the binary installer. 265 Sadly enough OSX does not have a central uninstaller. 266 267 The main bit of a framework install is the framework itself, installed in 268 ``/Library/Frameworks/Python.framework``. This can contain multiple versions 269 of Python, if you want to remove just one version you have to remove the 270 version-specific subdirectory: ``/Library/Frameworks/Python.framework/Versions/X.Y``. 271 If you do that, ensure that ``/Library/Frameworks/Python.framework/Versions/Current`` 272 is a symlink that points to an installed version of Python. 273 274 A framework install also installs some applications in ``/Applications/Python X.Y``, 275 276 And lastly a framework installation installs files in ``/usr/local/bin``, all of 277 them symbolic links to files in ``/Library/Frameworks/Python.framework/Versions/X.Y/bin``. 207 278 208 279 Odds and ends … … 216 287 217 288 Jack Jansen, Jack.Jansen@cwi.nl, 15-Jul-2004. 218 Ronald Oussoren, RonaldOussoren@mac.com, 26-May-2006289 Ronald Oussoren, RonaldOussoren@mac.com, 30-April-2010
Note:
See TracChangeset
for help on using the changeset viewer.