• Home
  • Raw
  • Download

Lines Matching +full:build +full:- +full:python

2 Python on Mac OS X README
6 Jack Jansen (2004-07),
7 Ronald Oussoren (2010-04),
8 Ned Deily (2014-05)
13 the Python distribution.
18 * ``--enable-framework[=DIR]``
20 If this argument is specified the build will create a Python.framework rather
22 _`Building and using a framework-based Python on Mac OS X` for more
26 into that directory. This can be used to install a python framework into
29 $ ./configure --enable-framework=/Users/ronald/Library/Frameworks
34 command-line tools in ``/Users/ronald/bin``.
36 * ``--with-framework-name=NAME``
38 Specify the name for the python framework, defaults to ``Python``. This option
39 is only valid when ``--enable-framework`` is specified.
41 * ``--enable-universalsdk[=PATH]``
43 Create a universal binary build of Python. This can be used with both
47 build. If xcodebuild is available and configured, this defaults to
52 Line Tools component using ``xcode-select``::
54 $ sudo xcode-select --install
56 See the section _`Building and using a universal binary of Python on Mac OS X`
59 * ``--with-universal-archs=VALUE``
62 only valid when ``--enable-universalsdk`` is specified. The default is
63 ``32-bit`` if a building with a SDK that supports PPC, otherwise defaults
67 Building and using a universal binary of Python on Mac OS X
71 -----------------------------
73 A universal binary build of Python contains object code for more than one
75 architecture-specific code into one file and can therefore run at native
77 OS X 10.4 to add support for Intel-based Macs to the existing PowerPC (PPC)
78 machines. In OS X 10.5 support was extended to 64-bit Intel and 64-bit PPC
79 architectures. It is possible to build Python with various combinations
80 of architectures depending on the build tools and OS X version in use.
82 2. How do I build a universal binary
83 ------------------------------------
85 You can enable universal binaries by specifying the "--enable-universalsdk"
88 $ ./configure --enable-universalsdk
92 This flag can be used with a framework build of python, but also with a classic
93 unix build. Universal builds were first supported with OS X 10.4 with Xcode 2.1
98 Apple-supplied compilers and other build tools included in Apple's Xcode
101 Python Developer's Guide (https://devguide.python.org/setup/)
107 It is possible to build a number of flavors of the universal binary build,
108 the default is a 32-bit only binary (i386 and ppc) in build environments that
110 Intel-32/-64-bit binary (i386 and X86_64) in build environments that do not
112 using the configure option ``--with-universal-archs=VALUE``. The following
117 * ``intel-32``: ``i386``
119 * ``intel-64``: ``x86_64``
121 * ``32-bit``: ``ppc``, ``i386``
123 * ``3-way``: ``i386``, ``x86_64``, ``ppc``
125 * ``64-bit``: ``ppc64``, ``x86_64``
129 To build a universal binary that includes a 64-bit architecture, you must build
130 on a system running OS X 10.5 or later. The ``all`` and ``64-bit`` flavors can
135 following combinations of SDKs and universal-archs flavors are available:
137 * 10.4u SDK with Xcode 2 supports ``32-bit`` only
141 * 10.6 SDK with Xcode 3.2.x supports ``intel``, ``3-way``, and ``32-bit``
149 The makefile for a framework build will also install ``python2.7-32``
150 binaries when the universal architecture includes at least one 32-bit
151 architecture (that is, for all flavors but ``64-bit``).
158 $ arch -i386 python
160 Or to explicitly run in 32-bit mode, regardless of the machine hardware::
162 $ arch -i386 -ppc python
164 NOTE: When you're using a framework install of Python this requires at least
165 Python 2.7 or 3.2, in earlier versions the python (and pythonw) commands are
171 under that Python. If you want to ensure that Python interpreters launched in
172 subprocesses also run in 32-bit-mode if the main interpreter does, use
173 a ``python2.7-32`` binary and use the value of ``sys.executable`` as the
176 Building and using a framework-based Python on Mac OS X.
180 1. Why would I want a framework Python instead of a normal static Python?
181 --------------------------------------------------------------------------
183 The main reason is because you want to create GUI programs in Python. With the
184 exception of X11/XDarwin-based GUI toolkits all GUI programs need to be run
190 A second reason for using frameworks is that they put Python-related items in
191 only two places: "/Library/Framework/Python.framework" and
192 "/Applications/Python <VERSION>" where ``<VERSION>`` can be e.g. "3.4",
194 Python from a binary distribution if they want to get rid of it again. Moreover,
198 2. How does a framework Python differ from a normal static Python?
199 ------------------------------------------------------------------
202 a different place. If you look in /Library/Frameworks/Python.framework
204 details. If you are used to a normal unix Python file layout go down to
208 ----------------------------
212 aware, though, that the Cocoa-based AquaTk's supplied starting with OS X
215 the ActiveTcl 8.5. See http://www.python.org/download/mac/tcltk/. If you
222 4. How do I build a framework Python?
223 -------------------------------------
225 This directory contains a Makefile that will create a couple of python-related
226 applications (full-blown OS X .app applications, that is) in
227 "/Applications/Python <VERSION>", and a hidden helper application Python.app
228 inside the Python.framework, and unix tools including "python" into
230 the relevant portions of the Mac subtree into the Python.framework.
235 1. ./configure --enable-framework
241 This sequence will put the framework in ``/Library/Framework/Python.framework``,
242 the applications in ``/Applications/Python <VERSION>`` and the unix tools in
247 by configuring with ``--enable-framework=$HOME/Library/Frameworks``.
249 at ``$HOME/Applications/Python-<VERSION>`` and ``$HOME/bin``.
252 frameworkinstall is composed of a couple of sub-targets that install the
257 "/Applications/Python <VERSION>", this is useful for binary
263 "IDLE.app" is an integrated development environment for Python: editor,
266 "Python Launcher.app" is a helper application that will handle things when you
267 double-click a .py, .pyc or .pyw file. For the first two it creates a Terminal
268 window and runs the scripts with the normal command-line Python. For the
269 latter it runs the script in the Python.app interpreter so the script can do
270 GUI-things. Keep the ``Option`` key depressed while dragging or double-clicking
272 through Python Launcher's preferences dialog.
274 "Build Applet.app" creates an applet from a Python script. Drop the script on it
275 and out comes a full-featured Mac OS X application. "Build Applet.app" is now
276 deprecated and has been removed in Python 3. As of OS X 10.8, Xcode 4 no
281 The program ``pythonx.x`` runs python scripts from the command line. Various
283 in early releases of Python on OS X was required to run GUI programs. In
286 current versions of Python 3.
291 Download and unpack the source release from http://www.python.org/download/.
293 ``build-installer.py`` that does all the work. This will download and build
294 a number of 3rd-party libaries, configures and builds a framework Python,
296 DMG image. The script also builds an HTML copy of the current Python
301 The script will build a universal binary so you'll therefore have to run this
303 However, the Python build process itself has several build dependencies not
306 provides a recent enough system Python (in ``/usr/bin``) to build
307 the Python documentation set. It should be possible to use SDKs and/or older
308 versions of Xcode to build installers that are compatible with older systems
312 dependencies. It is safest to build the distribution on a system running the
316 use your normal build directory nor does it install into /.
320 command-line arguments, run it with --help for more information.
333 configure: WARNING: ## -------------------------------------- ##
334 configure: WARNING: ## Report this to http://bugs.python.org/ ##
335 configure: WARNING: ## -------------------------------------- ##
337 This almost always means you are trying to build a universal binary for
338 Python and have libraries in ``/usr/local`` that don't contain the required
339 architectures. Temporarily move ``/usr/local`` aside to finish the build.
350 ``/Library/Frameworks/Python.framework``. This can contain multiple versions
351 of Python, if you want to remove just one version you have to remove the
352 version-specific subdirectory: ``/Library/Frameworks/Python.framework/Versions/X.Y``.
353 If you do that, ensure that ``/Library/Frameworks/Python.framework/Versions/Current``
354 is a symlink that points to an installed version of Python.
356 A framework install also installs some applications in ``/Applications/Python X.Y``,
359 them symbolic links to files in ``/Library/Frameworks/Python.framework/Versions/X.Y/bin``.
365 * http://www.python.org/download/mac/
367 * http://www.python.org/community/sigs/current/pythonmac-sig/
369 * https://devguide.python.org/