Just passing by to confirm that your build script works like a charm.
I especially like the templating idea.
I'm somewhat responsible for the win32 builds of mod_python, so Graham
asked me to have a look at mod_wsgi. Unfortunately, I was not as fast
as you ;).
I have also another build system that relies on the standard Python
setup.py procedure. It *could* allow us to support other compiler than
MSVC7.1, which is becoming increasingly rare, as well as other
platforms.
The script can be found at the address below, and it's heavily
inspired from mod_python, of course...
http://nicolas.lehuen.com/download/mod_wsgi/
Regards,
Nicolas
I'm glad that the script worked.
Unfortunately I couldn't try your script since from what Graham said
it requires a Perl installation and I really don't want to do that
(bad memories) :)
I also don't like VC71. Unfortunately we are stuck with it since it's
the one used by the binary release of Python 2.4/2.5 for Windows.
Visual Studio 2008, the next compiler likely to be used by Python will
probably appear after Python 2.6 is out, so one more iteration with
VC71 :(
I thought about mentioning the compiler warnings generated by Visual
Studio 2005.
Level 3 warnings (default warning level):
mod_wsgi.c(1287) : warning C4018: '>=' : signed/unsigned mismatch
mod_wsgi.c(1328) : warning C4018: '<' : signed/unsigned mismatch
mod_wsgi.c(1428) : warning C4018: '<' : signed/unsigned mismatch
mod_wsgi.c(1453) : warning C4018: '<' : signed/unsigned mismatch
mod_wsgi.c(1568) : warning C4018: '<' : signed/unsigned mismatch
Level 4 warnings:
mod_wsgi.c(302) : warning C4100: 's' : unreferenced formal parameter
mod_wsgi.c(421) : warning C4100: 'dir' : unreferenced formal parameter
mod_wsgi.c(1314) : warning C4389: '!=' : signed/unsigned mismatch
mod_wsgi.c(1329) : warning C4389: '!=' : signed/unsigned mismatch
mod_wsgi.c(1361) : warning C4389: '!=' : signed/unsigned mismatch
mod_wsgi.c(1506) : warning C4389: '!=' : signed/unsigned mismatch
mod_wsgi.c(1653) : warning C4389: '!=' : signed/unsigned mismatch
mod_wsgi.c(1689) : warning C4127: conditional expression is constant
mod_wsgi.c(2116) : warning C4127: conditional expression is constant
mod_wsgi.c(2116) : warning C4127: conditional expression is constant
mod_wsgi.c(2119) : warning C4127: conditional expression is constant
mod_wsgi.c(2119) : warning C4127: conditional expression is constant
mod_wsgi.c(2472) : warning C4100: 'name' : unreferenced formal
parameter
mod_wsgi.c(2528) : warning C4100: 'self' : unreferenced formal
parameter
mod_wsgi.c(3127) : warning C4100: 'data' : unreferenced formal
parameter
mod_wsgi.c(3740) : warning C4100: 'data' : unreferenced formal
parameter
mod_wsgi.c(3887) : warning C4100: 'mconfig' : unreferenced formal
parameter
mod_wsgi.c(3914) : warning C4100: 'mconfig' : unreferenced formal
parameter
mod_wsgi.c(3930) : warning C4100: 'mconfig' : unreferenced formal
parameter
mod_wsgi.c(3946) : warning C4100: 'mconfig' : unreferenced formal
parameter
mod_wsgi.c(3962) : warning C4100: 'mconfig' : unreferenced formal
parameter
mod_wsgi.c(3978) : warning C4100: 'mconfig' : unreferenced formal
parameter
mod_wsgi.c(4000) : warning C4100: 'mconfig' : unreferenced formal
parameter
mod_wsgi.c(4022) : warning C4100: 'mconfig' : unreferenced formal
parameter
mod_wsgi.c(4419) : warning C4189: 'c' : local variable is initialized
but not referenced
mod_wsgi.c(6867) : warning C4100: 'plog' : unreferenced formal
parameter
mod_wsgi.c(6866) : warning C4100: 'ptemp' : unreferenced formal
parameter
mod_wsgi.c(6932) : warning C4100: 's' : unreferenced formal parameter
mod_wsgi.c(6937) : warning C4100: 'p' : unreferenced formal parameter
mod_wsgi.c(1006) : warning C4706: assignment within conditional
expression
mod_wsgi.c(1692) : warning C4706: assignment within conditional
expression
mod_wsgi.c(2296) : warning C4706: assignment within conditional
expression
mod_wsgi.c(3402) : warning C4706: assignment within conditional
expression
Maybe the "unreferenced formal parameter" warnings could be fixed by
commenting the name of the parameter? That's what I usually do in C++.
I'm not sure if this is the C/Linux way.
The script that Nicolas came up with doesn't use Perl, it is a
standard Python distutils type build script. Nicolas was scared off of
the Perl requirement as well and so used similar Python only approach
to what mod_python uses.
Graham
I've put binaries for Python 2.4/2.5 combined with Apache 2.0/2.2
here:
http://adal.chiriliuc.com/temp/mod_wsgi_win32/
On 20 Jul, 01:14, "Graham Dumpleton" <graham.dumple...@gmail.com>
wrote:
I've also tested the generated binary (Python 2.5/Apache 2.2) and it
worked perfectly.
I have one small suggestion: maybe you can add an extra build step to
automatically rename mod_wsgi_so.pyd to mod_wsgi.so.
On Jul 18, 2:49 am, Nicolas Lehuen <nicolas.leh...@gmail.com> wrote:
I've put binaries for Python 2.4/2.5 combined with Apache 2.0/2.2
here:
http://adal.chiriliuc.com/temp/mod_wsgi_win32/
On 20 Jul, 01:14, "Graham Dumpleton" < graham.dumple...@gmail.com>
wrote:
> On 20/07/07, Adal Chiriliuc <adal.chiril...@gmail.com> wrote:
>
>
>
> > Hello Nicolas,
>
> > I'm glad that the script worked.
>
> > Unfortunately I couldn't try your script since from what Graham said
> > it requires a Perl installation and I really don't want to do that
> > (bad memories) :)
>
> The script that Nicolas came up with doesn't use Perl, it is a
> standard Python distutils type build script. Nicolas was scared off of
> the Perl requirement as well and so used similar Python only approach
> to what mod_python uses.
>
> Graham
On Jul 21, 4:42 am, "Ben Hoyt" <benh...@gmail.com> wrote:
> > I've put binaries for Python 2.4/2.5 combined with Apache 2.0/2.2
> > here:
> >http://adal.chiriliuc.com/temp/mod_wsgi_win32/
>
> I've just been playing with the Python 2.5, Apache 2.0 binary on my Windows
> devel machine. Works great, thanks Adal!
>
> Using WSGIScriptAlias and running a simple "Hello world" under web.py I got
> around 700 requests/second with mod_python, and 1000 requests/second with
> mod_wsgi (with "ab -n1000 -c10http://localhost/test"). That's not quite the
If all is okay I'll then tag this as 1.0c1 and create a source tarball
for release area.
I would then with your help like to get together some instructions for
installing Windows binaries you have been creating. Want to list stuff
like MS C/C++ runtime library dependencies for each Apache/Python
variant, plus things like ensuring access permissions are such that
Apache can read module and MS C/C++ runtime libraries, and that Python
was installed as administrator so that registry entries setup so
Apache service user will find them etc etc. In other words, a big list
of all the possible Windows issues that have come up over the years
with mod_python and which could also affect mod_wsgi.
Note, at the moment I haven't included either your build scripts or
Nicolas' script in the actual source package. We can work on including
some solution in source when we work through some instructions.
Thanks.
Graham
I would then with your help like to get together some instructions for
installing Windows binaries you have been creating. Want to list stuff
like MS C/C++ runtime library dependencies for each Apache/Python
variant, plus things like ensuring access permissions are such that
Apache can read module and MS C/C++ runtime libraries, and that Python
was installed as administrator so that registry entries setup so
Apache service user will find them etc etc. In other words, a big list
of all the possible Windows issues that have come up over the years
with mod_python and which could also affect mod_wsgi.
I've tested all four of them, they work properly.
In the previous test I couldn't get the Python 2.4 version to serve my
Pylons application. This was caused by me having two installed
versions of Python 2.4 and forgetting that in the registry the other
one than I was expecting was active (since it was the last one
installed). I fixed this and it worked.
> ensuring access permissions are such that Apache can read module and MS C/C++ runtime libraries.
As far as I can think this is not an issue on Windows (unless the user
played with file/folder permissions which would be unusual).
> Want to list stuff like MS C/C++ runtime library dependencies for each Apache/Python variant
This is easy. All of them have only one runtime library dependency:
msvcr71.dll. There is a potential problem here: if this library is not
installed somewhere in PATH, mod_wsgi.so will fail to load. The Python
2.4/2.5 installer puts this file in the Windows\system32 folder (which
is in PATH) if it's run as an administrator. Otherwise I think in the
Python installation folder (not sure). If it's put in the installation
folder, and that folder is added to the user PATH (so that python.exe
can be started from a command line), it should also work.
Or the user can just copy the file and put it next to mod_wsgi.so (or
apache.exe/httpd.exe - it depends on how Apache loads the dynamic
modules).
That being said, if Python was installed by an administrator for all
users, it should just work.
Note: in all my tests, I started Apache from a command line. I didn't
tried it when run as a service.
On Jul 25, 7:26 am, "Graham Dumpleton" <graham.dumple...@gmail.com>
wrote: