I am working on a Django project that requires debugging on a multi-threaded server. I found mod_wsgi 2.0+ the easiest to use, due to simple workarounds for reloading the python module. The problem is that he cannot compile it on Leopard. Is there anyone who has managed to do this so far for embedded Apache or MAMP. I would appreciate if someone posted a link to a precompiled binary (for intel, python 2.5, apache 2.2 or 2.0).
After 3 hours of trial and error, I managed to compile mod_wsgi 2.3 for Apache, which comes with Leopard. Here are the instructions if anyone needs it.
- ./Configure
Change 2 lines in Makefile
CFLAGS = -Wc, '- arch i386'
LDFLAGS = -arch i386 -Wl, -F / Library / Frameworks -framework Python -u _PyMac_Error
make && & sudo make install
Make thin httpd source binary
cd / usr / sbin
sudo mv./httpd./httpd.fat
sudo lipo./httpd.fat -thin i386 -output./httpd.i386
sudo ln -s./httpd.i386./httpd
This should work on intel macbook, macbook pro, imac and mac mini. As I understand it, the problem is that modwsgi will not compile in MacPython 2.5.2 due to some strange problem with an architecture error. But, if you compile it as a thin binary, it will not play with the Apache binary. Thus, this hack solves the problem. The rest is a fairly standard configuration, like on any other platform.
Vasil source share