Installing mod_python on Snow Leopard
I'd rather not use Macports. Simply cause Macport replaces (installs another Apache in /opt/local/bin) the default installation of Apache. And that would mean having ports install/replace PHP too. I'd rather use the de开发者_JAVA技巧fault installation included in Snow Leopard.
Been searching the net, and all I get is old instructions using Darwin Ports (older version of Macports) or instruction for Leopard (which hasn't panned out for me).
Can anyone point me in the right direction? Thanks.
PS: By the way mod_python for 1.6 or 3.1 is fine.
First of all, it seems that the mod_python development has somewhat stalled. I've read comments that, for wsgi-capable applications like Trac or Django, mod_wsgi is sufficient. Mod_wsgi compiles without problems on Snow Leopard (of course you need the Developer tools installed).
Of course, Macports or Fink is always an alternative. However, as opposed to Leopard where the supplied Apache and Python binaries were rather old, the Snow Leopard ones are current and 64-bit as well. Another advantage of using the Apple supplied binaries is that they get automatic security updates with the usual Apple Software Update. Last but not least you have better OS integration with using the standard supplied Apache.
fink is the alternative distribution to MacPorts. Given you're installing a module, it would most likely update your Apache instance as well.
Sounds like you'll probably need to build Apache (to get the header files/libraries you need to link to) and mod_python.
If you still want to avoid macports, I recommend checking out the mod_python trunk. I was actually able to build it with apache2 and Python 2.5 successfully without having to tweak the source of any of all the previously reported issues
svn co https://svn.apache.org/repos/asf/quetzalcoatl/mod_python/trunk mod_python-trunk
Macports is great if you are starting with a clean slate. But often you are just migrating systems (migrations assistant never gets the mod_python over) or even just upgrading the OS (had to rebuild mod_python for snow leopard)
:)
精彩评论