Commit 01d149fc authored by Ronald Oussoren's avatar Ronald Oussoren

Fix for issue #3646: with this patch it is possible to do a

framework install of Python in your home directory (on OSX):

   $ configure --enable-framework=${HOME}/Library/Frameworks
   $ make && make install

Without this patch the framework would get installed just fine,
but 'make install' would try to install the application bundles
and command-line tools outside the user's home, which doesn't work
for non-admin users (and is bad form anyway).
parent c121f130
......@@ -24,7 +24,7 @@ MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
BUNDLEBULDER=$(srcdir)/../../Lib/plat-mac/bundlebuilder.py
PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION)
PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
all: IDLE.app
......
......@@ -22,7 +22,7 @@ export MACOSX_DEPLOYMENT_TARGET
# These are normally glimpsed from the previous set
bindir=$(prefix)/bin
PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION)
PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
APPINSTALLDIR=$(prefix)/Resources/Python.app
# Variables for installing the "normal" unix binaries
......
......@@ -21,7 +21,7 @@ MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
BUNDLEBULDER=$(srcdir)/../../Lib/plat-mac/bundlebuilder.py
PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION)
PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o
all: Python\ Launcher.app
......
......@@ -8,13 +8,24 @@ the Python distribution.
Mac-specific arguments to configure
===================================
* ``--enable-framework``
* ``--enable-framework[=DIR]``
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.
If the optional directory argument is specified the framework it installed
into that directory. This can be used to install a python framework into
your home directory::
$ configure --enable-framework=/Users/ronald/Library/Frameworks
$ make && make install
This will install the framework itself in ``/Users/ronald/Library/Frameworks``,
the applications in a subdirectory of ``/Users/ronald/Applications`` and the
command-line tools in ``/Users/ronald/bin``.
* ``--with-framework-name=NAME``
Specify the name for the python framework, defaults to ``Python``. This option
......
......@@ -141,6 +141,9 @@ Build
- Issue #8509: Fix quoting in help strings and code snippets in configure.in.
- Issue #3646: It is now easily possible to install a Python framework into
your home directory on MacOSX, see Mac/README for more information.
What's New in Python 2.7 beta 1?
================================
......
#! /bin/sh
# From configure.in Revision: 80443 .
# From configure.in Revision: 80574 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for python 2.7.
#
......@@ -669,6 +669,7 @@ FRAMEWORKINSTALLLAST
FRAMEWORKALTINSTALLFIRST
FRAMEWORKALTINSTALLLAST
FRAMEWORKUNIXTOOLSPREFIX
FRAMEWORKINSTALLAPPSPREFIX
MACHDEP
SGI_ABI
EXTRAPLATDIR
......@@ -2018,18 +2019,55 @@ if test "${enable_framework+set}" = set; then
enable_framework=
;;
*)
PYTHONFRAMEWORKPREFIX=$enableval
PYTHONFRAMEWORKPREFIX="${enableval}"
PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
FRAMEWORKINSTALLAPPSPREFIX="/Applications"
if test "x${prefix}" = "xNONE" ; then
FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
else
FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
fi
case "${enableval}" in
/System*)
FRAMEWORKINSTALLAPPSPREFIX="/Applications"
if test "${prefix}" = "NONE" ; then
# See below
FRAMEWORKUNIXTOOLSPREFIX="/usr"
fi
;;
/Library*)
FRAMEWORKINSTALLAPPSPREFIX="/Applications"
;;
*/Library/Frameworks)
MDIR="`dirname "${enableval}"`"
MDIR="`dirname "${MDIR}"`"
FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
if test "${prefix}" = "NONE"; then
# User hasn't specified the
# --prefix option, but wants to install
# the framework in a non-default location,
# ensure that the compatibility links get
# installed relative to that prefix as well
# instead of in /usr/local.
FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
fi
;;
*)
FRAMEWORKINSTALLAPPSPREFIX="/Applications"
;;
esac
prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
# Add files for Mac specific code to the list of output
......@@ -2077,6 +2115,7 @@ fi
##AC_ARG_WITH(dyld,
## AC_HELP_STRING(--with-dyld,
## Use (OpenStep|Rhapsody) dynamic linker))
......@@ -3899,7 +3938,7 @@ else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
rm -f conftest*
rm -f -r conftest*
......@@ -5471,7 +5510,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_header_stdc=no
fi
rm -f conftest*
rm -f -r conftest*
fi
......@@ -5492,7 +5531,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_header_stdc=no
fi
rm -f conftest*
rm -f -r conftest*
fi
......@@ -6592,7 +6631,7 @@ _ACEOF
fi
rm -f conftest*
rm -f -r conftest*
{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
echo "${ECHO_T}$was_it_defined" >&6; }
......@@ -7129,7 +7168,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_type_uid_t=no
fi
rm -f conftest*
rm -f -r conftest*
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
......@@ -15952,7 +15991,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
unistd_defines_pthreads=no
fi
rm -f conftest*
rm -f -r conftest*
{ echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
......@@ -17566,7 +17605,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "yes" >/dev/null 2>&1; then
ipv6type=$i
fi
rm -f conftest*
rm -f -r conftest*
;;
kame)
......@@ -17589,7 +17628,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6libdir=/usr/local/v6/lib
ipv6trylibc=yes
fi
rm -f conftest*
rm -f -r conftest*
;;
linux-glibc)
......@@ -17610,7 +17649,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6type=$i;
ipv6trylibc=yes
fi
rm -f conftest*
rm -f -r conftest*
;;
linux-inet6)
......@@ -17648,7 +17687,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6lib=inet6;
ipv6libdir=/usr/local/v6/lib
fi
rm -f conftest*
rm -f -r conftest*
;;
v6d)
......@@ -17671,7 +17710,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6libdir=/usr/local/v6/lib;
BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
fi
rm -f conftest*
rm -f -r conftest*
;;
zeta)
......@@ -17693,7 +17732,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6lib=inet6;
ipv6libdir=/usr/local/v6/lib
fi
rm -f conftest*
rm -f -r conftest*
;;
esac
......@@ -26239,7 +26278,7 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
rm -f conftest*
rm -f -r conftest*
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
......@@ -26258,7 +26297,7 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
rm -f conftest*
rm -f -r conftest*
fi
......@@ -26528,7 +26567,7 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
rm -f conftest*
rm -f -r conftest*
fi
......@@ -28478,6 +28517,7 @@ FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
FRAMEWORKINSTALLAPPSPREFIX!$FRAMEWORKINSTALLAPPSPREFIX$ac_delim
MACHDEP!$MACHDEP$ac_delim
SGI_ABI!$SGI_ABI$ac_delim
EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
......@@ -28521,7 +28561,6 @@ OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
SO!$SO$ac_delim
LDSHARED!$LDSHARED$ac_delim
LDCXXSHARED!$LDCXXSHARED$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
......@@ -28563,6 +28602,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
LDCXXSHARED!$LDCXXSHARED$ac_delim
BLDSHARED!$BLDSHARED$ac_delim
CCSHARED!$CCSHARED$ac_delim
LINKFORSHARED!$LINKFORSHARED$ac_delim
......@@ -28593,7 +28633,7 @@ SRCDIRS!$SRCDIRS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 29; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
......
......@@ -190,18 +190,55 @@ AC_ARG_ENABLE(framework,
enable_framework=
;;
*)
PYTHONFRAMEWORKPREFIX=$enableval
PYTHONFRAMEWORKPREFIX="${enableval}"
PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
FRAMEWORKINSTALLAPPSPREFIX="/Applications"
if test "x${prefix}" = "xNONE" ; then
FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
else
FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
fi
case "${enableval}" in
/System*)
FRAMEWORKINSTALLAPPSPREFIX="/Applications"
if test "${prefix}" = "NONE" ; then
# See below
FRAMEWORKUNIXTOOLSPREFIX="/usr"
fi
;;
/Library*)
FRAMEWORKINSTALLAPPSPREFIX="/Applications"
;;
*/Library/Frameworks)
MDIR="`dirname "${enableval}"`"
MDIR="`dirname "${MDIR}"`"
FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
if test "${prefix}" = "NONE"; then
# User hasn't specified the
# --prefix option, but wants to install
# the framework in a non-default location,
# ensure that the compatibility links get
# installed relative to that prefix as well
# instead of in /usr/local.
FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
fi
;;
*)
FRAMEWORKINSTALLAPPSPREFIX="/Applications"
;;
esac
prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
# Add files for Mac specific code to the list of output
......@@ -239,6 +276,7 @@ AC_SUBST(FRAMEWORKINSTALLLAST)
AC_SUBST(FRAMEWORKALTINSTALLFIRST)
AC_SUBST(FRAMEWORKALTINSTALLLAST)
AC_SUBST(FRAMEWORKUNIXTOOLSPREFIX)
AC_SUBST(FRAMEWORKINSTALLAPPSPREFIX)
##AC_ARG_WITH(dyld,
## AC_HELP_STRING(--with-dyld,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment