[mod_python] Win32 platform - test installers available

David Fraser davidf at sjsoft.com
Thu Mar 4 18:44:52 EST 2004


Jochen Rebhan wrote:

>Has anyone managed to install v3.1.3 on a win32  platform ? 
>
>(WinXP, Apache Win32, Python 2.3.3).
>
>I have both the Mingw gcc as well as VC.Net v.7 installed.
>
>Any help would by highly appreciated !
>
>  
>
Me too! :-)
Is there a reason there hasn't been a binary made for win32 yet?
I'll try and look at it myself now, but using VC++ 6 so may be difficult...
I am using Apache 2.0.48 win32 sources and Python 2.3.3 standard 
distribution...

Compiling Apache for windows is described here:
http://httpd.apache.org/docs-2.0/platform/win_compiling.html
That seems to work fine with VC++ 6

Compiling mod_python for windows seems to require compiling in src based 
on the project file for VC++7
I took the vc7to6_prjconverter tool from 
http://www.codeproject.com/tools/prjconverter.asp and converted the file 
for VC++6
Then I had to manually change paths to point to my Apache include and 
Release (lib) directories and my Python include and libs directories
(note that I didn't have to compile Python from source as the include 
and libs are included with the standard distribution...)
These originally are set as $(PYTHONSRC) and $(APACHESRC) in the include 
and libs paths.
I also had to manually add the srclib/apr/include and 
srclib/apr-util/include directories from Apache to the include path, and 
the srclib/apr/Release and srclib/apr-util/Release directories to the 
library path.
Then mod_python linked successfully!

To build the win32 installer it needs to be done in the dist directory 
(apparently under Unix)
I had troubles trying to run configure on MinGW as it needs an apxs to 
find...
but the APXS is not actually needed for the setup script (the code that 
used it is commented out)
So I ran configure on Linux, and built the installer there...
This is done by copying src/Release/mod_python.so to the dist directory.

In fact I found that by simply copying the setup.py generated on Linux I 
could run this on Windows
The instruction is:
  setup.py bdist_wininst --install-script=win32_postinstall.py

I hope the above instructions are useful to anyone else trying the same 
thing.
I have not yet fully tested this binary or installer but it seemed to 
run our applications fine.
mod_python.so and mod_python-3.1.3.win32.exe can be downloaded from:
http://davidf.sjsoft.com/files/mod_python.so
http://davidf.sjsoft.com/files/mod_python-3.1.3.win32.exe

I would appreciate feedback (on this list) so that hopefully these can 
be included in the official release ...

David


More information about the Mod_python mailing list