]> granicus.if.org Git - python/commitdiff
Merged revisions 80647 via svnmerge from
authorRonald Oussoren <ronaldoussoren@mac.com>
Fri, 30 Apr 2010 11:41:56 +0000 (11:41 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Fri, 30 Apr 2010 11:41:56 +0000 (11:41 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80647 | ronald.oussoren | 2010-04-30 13:20:14 +0200 (Fri, 30 Apr 2010) | 11 lines

  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).
........

Mac/Makefile.in
Mac/PythonLauncher/Makefile.in
Mac/README
Misc/NEWS
configure
configure.in

index bea5f995e910457cd929d0c3d7234fbef976ca2b..467bb32176c664f7843ae6f66bcf11593617992b 100644 (file)
@@ -24,7 +24,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
index 539ed1a8d0c6153eb9043cb41895287579307e04..970b83f314908b6b6d2fb99283ab5cd6ae061fc1 100644 (file)
@@ -21,7 +21,7 @@ MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
 
 BUNDLEBULDER=$(srcdir)/../Tools/bundlebuilder.py
 
-PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION)
+PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
 OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o
 
 install: Python\ Launcher.app
index e4ff868237e3da4a6153e6f4e6737872a52744a9..da6a05fd86bd8b380f6900eb2e91cbf38e803139 100644 (file)
@@ -5,13 +5,24 @@ MacOSX Notes
 This document provides a quick overview of some Mac OS X specific features in
 the Python distribution.
 
-* ``--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
index 8c507234687ca0603940c2974e66ae922f073676..e1b011608ef653aa4b17d1d6420876deae2f71dd 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1109,6 +1109,9 @@ Extension Modules
 Build
 -----
 
+- Issue #3646: It is now easily possible to install a Python framework into
+  your home directory on MacOSX, see Mac/README for more information.
+
 - Issue #3928: os.mknod() now available in Solaris, also.
 
 - Issue #3326: Build Python without -fno-strict-aliasing when the gcc does not
index 1b084e9a4ebb40a4932cf9ed27d81cf09e664908..a4287bc71f941ca64c0dba9355fc12db54861315 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 80481 .
+# From configure.in Revision: 80576 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.65 for python 3.2.
 #
@@ -664,6 +664,7 @@ EXPORT_MACOSX_DEPLOYMENT_TARGET
 CONFIGURE_MACOSX_DEPLOYMENT_TARGET
 SGI_ABI
 MACHDEP
+FRAMEWORKINSTALLAPPSPREFIX
 FRAMEWORKUNIXTOOLSPREFIX
 FRAMEWORKALTINSTALLLAST
 FRAMEWORKALTINSTALLFIRST
@@ -2849,18 +2850,55 @@ if test "${enable_framework+set}" = set; then :
                enable_framework=
                ;;
        *)
-               PYTHONFRAMEWORKPREFIX=$enableval
+               PYTHONFRAMEWORKPREFIX="${enableval}"
                PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
                FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
                FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
                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
@@ -2906,6 +2944,7 @@ fi
 
 
 
+
 ##AC_ARG_WITH(dyld,
 ##            AS_HELP_STRING([--with-dyld],
 ##                           [Use (OpenStep|Rhapsody) dynamic linker]))
index d4f74bcbbfe02efb9216d33217035b3721aa4722..c127a632181613e2941c0cd039850b95a7f76e80 100644 (file)
@@ -179,18 +179,55 @@ AC_ARG_ENABLE(framework,
                enable_framework=
                ;;
        *)
-               PYTHONFRAMEWORKPREFIX=$enableval
+               PYTHONFRAMEWORKPREFIX="${enableval}"
                PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
                FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
                FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
                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
@@ -227,6 +264,7 @@ AC_SUBST(FRAMEWORKINSTALLLAST)
 AC_SUBST(FRAMEWORKALTINSTALLFIRST)
 AC_SUBST(FRAMEWORKALTINSTALLLAST)
 AC_SUBST(FRAMEWORKUNIXTOOLSPREFIX)
+AC_SUBST(FRAMEWORKINSTALLAPPSPREFIX)
 
 ##AC_ARG_WITH(dyld,
 ##            AS_HELP_STRING([--with-dyld],