mod_python compilation error in VS 2008 for py2.7.1

asimkon asimkostas at gmail.com
Tue Jun 14 06:50:32 EDT 2016


I would like to ask you a technical question regarding python module
compilation for python 2.7.1.

I want to compile mod_python
<https://app.box.com/s/orsffo3t4g6h9ftkq6p1>library
for Apache 2.2 and py2.7 <https://www.python.org/downloads/> on Win32 in
order to use it for  psp - py scripts that i have written. I tried to
compile it using VS 2008 (VC++) and unfortunately i get an error on
pyconfig.h (Py2.7/include) error C2632: int followed by int  is illegal.

This problem occurs when i try to run the bat file that exists on
mod_python/dist folder. Any idea or suggestion what should i do in order to
run it on Win 7 Pro (win 32) environment and produce the final apache
executable module (.so).

 I have posted the same question here
<http://stackoverflow.com/questions/37696936/vc-compilation-error-in-pyconfig-h-vs-2008>,
but unfortunately i had had no luck!


Additionally i give you the compilation instructions that i follow (used
also MinGW-w64 and get the same error) in order to produce the final output!

Compiling

Open a command prompt with VS2008 support. The easiest way to do this is to
use "Start | All Programs | Microsoft Visual Studio 2008 | Visual Studio
Tools | Visual Studio 2008 Command Prompt". (This puts the VS2008 binaries
in the path and sets up the lib/include environmental variables for the
Platform SDK.)

1.cd to the mod_python\dist folder.

2.Tell mod_python where Apache is: set APACHESRC=C:\Apache

3. Run build_installer.bat.

If it succeeds, an installer.exe will be created in a subfolder. Run that
install the module.


Kind  Regards

Kostas Asimakopoulos


More information about the Python-list mailing list