mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
* Update the Mac/README file. Add the list of OSX-specific configure options
to that README file with some explanation. * Be more strict in the configure script: complain loudly when the user has specified invalid combinations of OSX-specific configure arguments. The error message refers to the Mac/README file for more information.
This commit is contained in:
parent
f70867aabc
commit
9ebd242fbb
3 changed files with 97 additions and 18 deletions
83
Mac/README
83
Mac/README
|
|
@ -5,6 +5,39 @@ MacOSX Notes
|
||||||
This document provides a quick overview of some Mac OS X specific features in
|
This document provides a quick overview of some Mac OS X specific features in
|
||||||
the Python distribution.
|
the Python distribution.
|
||||||
|
|
||||||
|
Mac-specific arguments to configure
|
||||||
|
===================================
|
||||||
|
|
||||||
|
* ``--enable-framework``
|
||||||
|
|
||||||
|
If this argument is specified the build will create a Python.framework rather
|
||||||
|
than a traditional Unix install. See the section
|
||||||
|
_`Building and using a framework-based Python on Mac OS X` for more
|
||||||
|
information on frameworks.
|
||||||
|
|
||||||
|
* ``--with-framework-name=NAME``
|
||||||
|
|
||||||
|
Specify the name for the python framework, defaults to ``Python``. This option
|
||||||
|
is only valid when ``--enable-framework`` is specified.
|
||||||
|
|
||||||
|
* ``--enable-universalsdk[=PATH]``
|
||||||
|
|
||||||
|
Create a universal binary build of of Python. This can be used with both
|
||||||
|
regular and framework builds.
|
||||||
|
|
||||||
|
The optional argument specifies with OSX SDK should be used to perform the
|
||||||
|
build. This defaults to ``/Developer/SDKs/MacOSX.10.4u.sdk``, specify
|
||||||
|
``/`` when building on a 10.5 system, especially when building 64-bit code.
|
||||||
|
|
||||||
|
See the section _`Building and using a universal binary of Python on Mac OS X`
|
||||||
|
for more information.
|
||||||
|
|
||||||
|
* ``--with-univeral-archs=VALUE``
|
||||||
|
|
||||||
|
Specify the kind of universal binary that should be created. This option is
|
||||||
|
only valid when ``--enable-universalsdk`` is specified.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Building and using a universal binary of Python on Mac OS X
|
Building and using a universal binary of Python on Mac OS X
|
||||||
===========================================================
|
===========================================================
|
||||||
|
|
@ -31,6 +64,34 @@ unix build. Either way you will have to build python on Mac OS X 10.4 (or later)
|
||||||
with Xcode 2.1 (or later). You also have to install the 10.4u SDK when
|
with Xcode 2.1 (or later). You also have to install the 10.4u SDK when
|
||||||
installing Xcode.
|
installing Xcode.
|
||||||
|
|
||||||
|
The option ``--enable-universalsdk`` has an optional argument to specify an
|
||||||
|
SDK, which defaults to the 10.4u SDK. When you build on OSX 10.5 or later
|
||||||
|
you can use the system headers instead of an SDK::
|
||||||
|
|
||||||
|
$ ./configure --enable-universalsdk=/
|
||||||
|
|
||||||
|
2.1 Flavours of universal binaries
|
||||||
|
..................................
|
||||||
|
|
||||||
|
It is possible to build a number of flavours of the universal binary build,
|
||||||
|
the default is a 32-bit only binary (i386 and ppc). The flavour can be
|
||||||
|
specified using the option ``--with-universal-archs=VALUE``. The following
|
||||||
|
values are available:
|
||||||
|
|
||||||
|
* ``32-bit``: ``ppc``, ``i386``
|
||||||
|
|
||||||
|
* ``64-bit``: ``ppc64``, ``x86_64``
|
||||||
|
|
||||||
|
* ``all``: ``ppc``, ``ppc64``, ``i386``, ``x86_64``
|
||||||
|
|
||||||
|
* ``3-way``: ``ppc``, ``i386`` and ``x86_64``
|
||||||
|
|
||||||
|
* ``intel``: ``i386``, ``x86_64``
|
||||||
|
|
||||||
|
To build a universal binary that includes a 64-bit architecture you must build
|
||||||
|
on a system running OSX 10.5 or later. The ``all`` flavour can only be build on
|
||||||
|
OSX 10.5.
|
||||||
|
|
||||||
|
|
||||||
Building and using a framework-based Python on Mac OS X.
|
Building and using a framework-based Python on Mac OS X.
|
||||||
========================================================
|
========================================================
|
||||||
|
|
@ -81,18 +142,20 @@ inside the Python.framework, and unix tools "python" and "pythonw" into
|
||||||
the relevant portions of the Mac subtree into the Python.framework.
|
the relevant portions of the Mac subtree into the Python.framework.
|
||||||
|
|
||||||
It is normally invoked indirectly through the main Makefile, as the last step
|
It is normally invoked indirectly through the main Makefile, as the last step
|
||||||
in the sequence
|
in the sequence::
|
||||||
|
|
||||||
1. ./configure --enable-framework
|
$ ./configure --enable-framework
|
||||||
|
$ make
|
||||||
2. make
|
$ make install
|
||||||
|
|
||||||
3. make install
|
|
||||||
|
|
||||||
This sequence will put the framework in /Library/Framework/Python.framework,
|
This sequence will put the framework in /Library/Framework/Python.framework,
|
||||||
the applications in "/Applications/MacPython 2.6" and the unix tools in
|
the applications in "/Applications/MacPython 2.6" and the unix tools in
|
||||||
/usr/local/bin.
|
/usr/local/bin.
|
||||||
|
|
||||||
|
It is possible to select a different name for the framework using the configure
|
||||||
|
option ``--with-framework-name=NAME``. This makes it possible to have several
|
||||||
|
parallel installs of a Python framework.
|
||||||
|
|
||||||
Installing in another place, for instance $HOME/Library/Frameworks if you have
|
Installing in another place, for instance $HOME/Library/Frameworks if you have
|
||||||
no admin privileges on your machine, has only been tested very lightly. This
|
no admin privileges on your machine, has only been tested very lightly. This
|
||||||
can be done by configuring with --enable-framework=$HOME/Library/Frameworks.
|
can be done by configuring with --enable-framework=$HOME/Library/Frameworks.
|
||||||
|
|
@ -101,14 +164,6 @@ will then also be deposited in $HOME. This is sub-optimal for the unix tools,
|
||||||
which you would want in $HOME/bin, but there is no easy way to fix this right
|
which you would want in $HOME/bin, but there is no easy way to fix this right
|
||||||
now.
|
now.
|
||||||
|
|
||||||
If you want to install some part, but not all, read the main Makefile. The
|
|
||||||
frameworkinstall is composed of a couple of sub-targets that install the
|
|
||||||
framework itself, the Mac subtree, the applications and the unix tools.
|
|
||||||
|
|
||||||
There is an extra target frameworkinstallextras that is not part of the
|
|
||||||
normal frameworkinstall which installs the Demo and Tools directories
|
|
||||||
into "/Applications/MacPython 2.6", this is useful for binary distributions.
|
|
||||||
|
|
||||||
What do all these programs do?
|
What do all these programs do?
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
|
|
|
||||||
20
configure
vendored
20
configure
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.in Revision: 74715 .
|
# From configure.in Revision: 74978 .
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.61 for python 2.7.
|
# Generated by GNU Autoconf 2.61 for python 2.7.
|
||||||
#
|
#
|
||||||
|
|
@ -1923,6 +1923,13 @@ if test "${with_universal_archs+set}" = set; then
|
||||||
{ echo "$as_me:$LINENO: result: $withval" >&5
|
{ echo "$as_me:$LINENO: result: $withval" >&5
|
||||||
echo "${ECHO_T}$withval" >&6; }
|
echo "${ECHO_T}$withval" >&6; }
|
||||||
UNIVERSAL_ARCHS="$withval"
|
UNIVERSAL_ARCHS="$withval"
|
||||||
|
if test "${enable_universalsdk}" ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
{ { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
|
||||||
|
echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
|
||||||
|
{ (exit 1); exit 1; }; }
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
|
@ -1938,6 +1945,13 @@ fi
|
||||||
# Check whether --with-framework-name was given.
|
# Check whether --with-framework-name was given.
|
||||||
if test "${with_framework_name+set}" = set; then
|
if test "${with_framework_name+set}" = set; then
|
||||||
withval=$with_framework_name;
|
withval=$with_framework_name;
|
||||||
|
if test "${enable_framework}"; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
{ { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
|
||||||
|
echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
|
||||||
|
{ (exit 1); exit 1; }; }
|
||||||
|
fi
|
||||||
PYTHONFRAMEWORK=${withval}
|
PYTHONFRAMEWORK=${withval}
|
||||||
PYTHONFRAMEWORKDIR=${withval}.framework
|
PYTHONFRAMEWORKDIR=${withval}.framework
|
||||||
PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
|
PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
|
||||||
|
|
@ -14612,8 +14626,8 @@ _ACEOF
|
||||||
echo "${ECHO_T}yes" >&6; }
|
echo "${ECHO_T}yes" >&6; }
|
||||||
if test $enable_shared = "yes"
|
if test $enable_shared = "yes"
|
||||||
then
|
then
|
||||||
{ { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
|
{ { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
|
||||||
echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;}
|
echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&2;}
|
||||||
{ (exit 1); exit 1; }; }
|
{ (exit 1); exit 1; }; }
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
|
||||||
12
configure.in
12
configure.in
|
|
@ -118,6 +118,11 @@ AC_ARG_WITH(universal-archs,
|
||||||
[
|
[
|
||||||
AC_MSG_RESULT($withval)
|
AC_MSG_RESULT($withval)
|
||||||
UNIVERSAL_ARCHS="$withval"
|
UNIVERSAL_ARCHS="$withval"
|
||||||
|
if test "${enable_universalsdk}" ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([--with-universal-archs without --enable-universalsdk. See Mac/README])
|
||||||
|
fi
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
AC_MSG_RESULT(32-bit)
|
AC_MSG_RESULT(32-bit)
|
||||||
|
|
@ -129,6 +134,11 @@ AC_ARG_WITH(framework-name,
|
||||||
AC_HELP_STRING(--with-framework-name=FRAMEWORK,
|
AC_HELP_STRING(--with-framework-name=FRAMEWORK,
|
||||||
specify an alternate name of the framework built with --enable-framework),
|
specify an alternate name of the framework built with --enable-framework),
|
||||||
[
|
[
|
||||||
|
if test "${enable_framework}"; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([--with-framework-name without --enable-framework. See Mac/README])
|
||||||
|
fi
|
||||||
PYTHONFRAMEWORK=${withval}
|
PYTHONFRAMEWORK=${withval}
|
||||||
PYTHONFRAMEWORKDIR=${withval}.framework
|
PYTHONFRAMEWORKDIR=${withval}.framework
|
||||||
PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr '[A-Z]' '[a-z]'`
|
PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr '[A-Z]' '[a-z]'`
|
||||||
|
|
@ -1615,7 +1625,7 @@ then
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
if test $enable_shared = "yes"
|
if test $enable_shared = "yes"
|
||||||
then
|
then
|
||||||
AC_MSG_ERROR([Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead])
|
AC_MSG_ERROR([Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README.])
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue