These instructions are not sufficient. The apache environment I have on windows has include files in <apachesr>/include but also in <apachesrc>/srclib/apr/include, <apachesrc>/srclib/apr-iconv/include, and <apachesrc>/srclib/apr-util/include

Setting the APACHESRC environmental per the instructions only finds the includes in $APACHESRC/include but not the apr files like apr.h in the error I posted. In the vcproj file, I had to tell the IDE in some dialog where to find these include files. Is there some other environmental or is there some copy phase in the build on Linux that gets all the include files into $APACHESRC/include?

Where is apr.h on your machine?


----- Original Message ----- From: "Graham Dumpleton" <[EMAIL PROTECTED]>
To: <>
Sent: Sunday, November 12, 2006 20:18
Subject: Re: mod_python 3.3.0-dev-20061109 tests on Win32

Try follow these instructions:

If these are correct, they probably should be put in the source code if they
aren't already.


Jeff Robbins wrote ..
re: building on Win32

I tried using but even once I set APACHESRC it still couldn't
the apr* include directories.  I set ext_modules = [PSPModule] alone and
built _psp.pyd no problem!

C:\work\mod_python-3.3.0-dev-20061109\dist>python build
running build
running build_py
running build_ext
building 'mod_python_so' extension
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo
 /MD /W3 /GX
/DNDEBUG -DWIN32 -DNDEBUG -D_WINDOWS -IC:\work\mod_python-3.3.0-dev
-20061109\src\include -IC:\work\httpd-2.2.3\include -IC:\Python24\include
ython24\PC /TcC:\work\mod_python-3.3.0-dev-20061109\src\mod_python.c
c:\work\httpd-2.2.3\include\ap_config.h(25) : fatal error C1083: Cannot
lude file: 'apr.h': No such file or directory
error: command '"C:\Program Files\Microsoft Visual Studio .NET
xe"' failed with exit status 2

----- Original Message ----- From: "Graham Dumpleton" <[EMAIL PROTECTED]>
To: "Jeff Robbins" <[EMAIL PROTECTED]>
Cc: "python-dev list" <>
Sent: Saturday, November 11, 2006 20:18
Subject: Re: mod_python 3.3.0-dev-20061109 tests on Win32

> On 12/11/2006, at 12:31 AM, Jeff Robbins wrote:
>> 3 problems found on Win32:
>> 1) _psp didn't build and I don't know how to build it
> How are you trying to build mod_python in the first place? Are you > using > dist/build_installer.bat or using VisualStudio project file. The > latter
> isn't
> really used any longer and isn't tested. We know that it doesn't list
> finfoobject.c file for a start.
>> 2) In the 'Testing PythonImport' test, the path separators in the  two
>> paths being compared are different (no doubt due to Win32  backslash
>> forward slash issues)
>> the code does this:
>>    directory = os.path.dirname(__file__)
>>    assert(sys.path.count(directory) == 1)
>> os.path.dirname(__file__) is 'C:\\work\\mod_python-3.3.0-
>> dev-20061109\\test\\htdocs'
>> yet sys.path has this in it 'C:/work/mod_python-3.3.0-dev-20061109/
>> test\\\\htdocs'
>> so the assert fails since the first string can't be found in  sys.path
>> (count == 0)
> If in test/ you change:
>         c = Container(PythonPath("[r'%s']+sys.path" % DOCUMENT_ROOT),
> to:
>         c = Container(PythonPath("[r'%s']+sys.path" %
> os.path.normpath(DOCUMENT_ROOT)),
> does it pass?
>> 3) in test_interpreter_per_directory() the code does this:
>>        rsp = self.vhost_get("test_interpreter_per_directory", '/
>> subdir/').upper()
>> interpreter+'SUBDIR/' is 'C:/WORK/MOD_PYTHON-3.3.0-DEV-20061109/
>> rsp is 'C:/WORK/MOD_PYTHON-3.3.0-DEV-20061109/TEST/HTDOCS/'
>> I don't understand the code but it looks like in the
>> interpreter() code
>> def interpreter(req):
>>    if req.phase == "PythonFixupHandler":
>>        if req.filename[-1] != '/' and os.path.isdir(req.filename):
>>            req.write(req.interpreter)
>>            return apache.DONE
>>        return apache.OK
>>    else:
>>        req.write(req.interpreter)
>>        return apache.DONE
>> perhaps the req.filename 'C:/work/mod_python-3.3.0-dev-20061109/
>> test/htdocs/subdir' is supposed to pass the os.path.isdir() >> test...but
>> it doesn't.  There is no 'subdir' folder under htdocs so  on Win32,
>> os.path.isdir() returns False.  Maybe this is an os  dependency?
> The 'subdir' directory exists in the tarball. Any chance you > accidentally
> deleted
> it somehow? Can you in a fresh directory unpack the tarball, verify
> the
> directory exists and then rebuild and retest?
> Graham

Reply via email to