[mod_python] Status of Mac OS X / Apache 1.3 / mod_python 2.7.10.

Justin Ryan jryan at qutang.net
Wed Aug 4 16:26:12 EDT 2004

Be careful when playing with the file/directory/link/whateva that is 
/System/Library/Frameworks/Python.Framework.  I ran into some wierdness 
trying to change this into a symlink and move it around (i.e. change it 
back and forth from pointing to Apple's python and my own).

Also, take care when using the 'python' command after installing your 
own framework build.  It's kind of a pain to get a framework build to 
stick python, pythonw, etc.. in /usr/bin - all of my stuff was in 
/usr/local/bin, even though I passed --prefix=/usr to the configure 

Sure would be rad if there were a doc outlining how exactly apple 
builds python for inclusion into OSX. ;)



On Jul 31, 2004, at 7:24 AM, Antonio Rodriguez wrote:

> Graham,
> I was able to get it 2.7.10 to work on the stock apache with OSX by 
> just downloading the latest python and doing a framework build (after 
> moving aside the one that comes with OSX). This seems like it might 
> have caused a lot of headaches but std. python build as a framework 
> does pretty well on OSX.
> AR
> On Jul 31, 2004, at 4:13 AM, Graham Dumpleton wrote:
>> I wanted to get mod_python working with the standard version of 
>> Apache (1.3) that
>> comes with Mac OS 10.3 but before I even tried I noted a number of 
>> posts in various
>> places on the net asking how to get it to work since they weren't 
>> even able to
>> get it to compile or if they did, the apache process died when 
>> mod_python was
>> loaded. In my search, I couldn't find anyone indicating that they had 
>> solved the
>> problem. The only positive indication was someone making available a 
>> prebuilt
>> version of mod_python but this was for Mac OS 10.1 and it has since 
>> been removed
>> from the net.
>> Actually trying it myself, I fixed the obvious problems with the 
>> makefiles and build
>> process but also found that the apache process died. Digging further, 
>> I found the
>> underlying problem was that Py_IsInitialized() always returned true, 
>> even on the
>> first time it was called from the python_init() function in 
>> mod_python.c. As such,
>> the required call to Py_Initialize() never occurred, nor did setup 
>> for threading.
>> Because initialisation of the interpreter never occurred, Python 
>> subsequently died
>> the first time a Python function was actually called. Adding a 
>> separate initialisation
>> flag in python_init() fixed the problem and so far on a simple 
>> example it is working
>> okay.
>> That said, what is the official status of mod_python 2.7.10 on Mac OS 
>> X with the
>> version of Apache (1.3) that comes with the OS?
>> Can post instructions/patch later if there is the interest.
>> --
>> Graham Dumpleton (grahamd at dscpl.com.au)
>> _______________________________________________
>> Mod_python mailing list
>> Mod_python at modpython.org
>> http://mailman.modpython.org/mailman/listinfo/mod_python
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list