Framework installation of 2.6 on OS X, with specified prefix

Evert Rol evert.rol at gmail.com
Fri Feb 20 21:01:19 EST 2009


On 20 Feb 2009, at 21:48 , Ned Deily wrote:

> In article <F80F3FDD-B12F-42D5-BB05-4A4B180FAC1F at gmail.com>,
> Evert Rol <evert.rol at gmail.com> wrote:
>> I'm trying to install Python 2.6 from source on Mac OS X.5, in its  
>> own
>> directory using a framework install. That goes fine, up to the point
>> where it wants to install the applications that come with it (eg, the
>> Wish shell): it tries to install things into /Applications, instead  
>> of
>> eg <prefix>/Applications.
>> Here's my configure line (the flags are there just to let it find my
>> own installed readline):
>>
>> CPPFLAGS=-I/sw/include LDFLAGS=-L/sw/lib ./configure --prefix=/sw --
>> enable-shared --enable-framework=/sw/Library/Frameworks --with-
>> readline=/sw --with-pth CC=gcc-4.2  MACOSX_DEPLOYMENT_TARGET=10.5
>>
>>
>> And the last part of the output of 'make install':
>>
>> ../python.exe ./scripts/BuildApplet.py \
>> 		--destroot "" \
>> 		--python=/sw/Library/Frameworks/Python.framework/Versions/2.6/
>> Resources/Python.app/Contents/MacOS/Python`test -f "/sw/Library/
>> Frameworks/Python.framework/Versions/2.6/Resources/Python.app/ 
>> Contents/
>> MacOS/Python-32" && echo "-32"`  \
>> 		--output "/sw/Applications/Python 2.6/Build Applet.app" \
>> 		./scripts/BuildApplet.py
>> cd PythonLauncher && make install DESTDIR=
>> test -d "/Applications/Python 2.6" || mkdir -p "/Applications/Python
>> 2.6"
>> mkdir: /Applications/Python 2.6: Permission denied
>> make[2]: *** [install] Error 1
>> make[1]: *** [install_PythonLauncher] Error 2
>> make: *** [frameworkinstallapps] Error 2
>>
>> Is there an option on the configure line that I need to set, or
>> something in setup.py? Or perhaps hack the Makefile?
>
> FWIW, the OS X build-installer.py script handles this by specifying a
> DESTDIR on the make install steps rather than including a --prefix on
> the configure.   See Mac/BuildScript/build-installer.py.

That worked: make install DESTDIR=/sw .
Not sure if it's the proper way to do it, but it installed fine now.
I did have to change the configure line:

CPPFLAGS=-I/sw/include LDFLAGS=-L/sw/lib ./configure --
enable-shared --enable-framework=/Library/Frameworks --with-
readline=/sw --with-pth CC=gcc-4.2  MACOSX_DEPLOYMENT_TARGET=10.5

So --prefix has gone, and --enable-framework lost the /sw. Then the  
DESTDIR setting on the make line prepends it as necessary.

I would have hoped an option on the configure line would have taken  
care of this (--exec-prefix doesn't do it, at least), but well, maybe  
next time.

(Actually, checking again, I now also have a /sw/sw/Applications  
directory, next to the /sw/Applications dir. The former contains  
Applet.app; no idea how it ended up there, while IDLE.app and Python  
Launcher.app ended up in /sw/Applications. So, it almost worked; maybe  
there's some double $DESTDIR/$DESTDIR in the Makefile. Good enough for  
my purposes though.)

Thanks!

   Evert




More information about the Python-list mailing list