[Pythonmac-SIG] Building python 2.4.3 on OSX 10.3.9

Bob Ippolito bob at redivi.com
Wed Jul 12 20:43:57 CEST 2006


On Jul 12, 2006, at 11:28 AM, Michael Glassford wrote:

> Bob Ippolito wrote:
>> On Jul 12, 2006, at 7:51 AM, Michael Glassford wrote:
>>>
>> and  second it's not what you're running anyway! Look at the site- 
>> packages  dir in the exception, that's a normal unix install, not  
>> a framework  install.
>
> Yes, as I said I ran three different executables and got the same  
> error from each. This is only one of the three errors. Presumably  
> the others would have had different site-packages paths.  
> Unfortunately, the output is long gone and I can't reproduce this  
> problem again except with /usr/local/bin/python2.4; however, I ran  
> each more than once just to make sure, using the full path each  
> time, so I don't see how I could have been mistaken. In any case...
>
> > You need a framework install (./configure --enable-framework
>> && sudo make frameworkinstall).
>
> Is there somewhere that I should have learned about this option?

Mac/OSX/README in the sources, ./configure --help, or mailing list  
archives. Where would you have expected to learn about the option?  
Did you read documentation somewhere before building?

> When I did this, all of the unit tests passed. When I run /usr/ 
> local/bin/python2.4 I still get this error:
>
> """
...
> RuntimeError: Can't send Apple events: no access to Window Manager.  
> (aem-based scripts must be run within a GUI process; e.g. use  
> 'pythonw', not 'python', if running script in shell)
> """
>
> However, /usr/local/bin/pythonw2.4 appears to work OK now.

This is expected for that version of Python.

> This behavior is different from the Python installed on Tiger by  
> the 2.4 universal binary installer (where there is no pythonw and  
> python has access to the window manager), but at least I have  
> something that seems to work now.

Yes, it is different than Universal Python because you compiled  
different sources. Universal Python 2.4.3 is a fork of Python that  
includes several Mac-specific features that aren't in the mainline  
sources until Python 2.5. The Universal Python repository is at:
http://svn.pythonmac.org/python24/python24-fat/

Universal Python 2.4.3 does have "pythonw", for compatibility, but it  
is the same as what you get when you run "python". Technically, both  
the "python" and "pythonw" executables for Universal Python are a  
compiled equivalent to the previously shell script "pythonw", which  
re-execs the Python interpreter with a different argv[0] (inside an  
app bundle).

-bob



More information about the Pythonmac-SIG mailing list