[mapserver-users] missing __init__ in python mapscript (fwd)

Norman Vine nhv at cape.com
Sun Jan 27 03:45:02 PST 2002


Tom Russell writes:
>
>Norman,
>
>It appears that the problem is indeed related to the Setup 
>file, as I was
>able to reproduce the 'missing __init__" error on a sample project by
>leaving out a middle term, which is the original c source file(s).
>Apparently, it should be something like the following:
>
>*shared*
>mapscriptc layer.c label.c mapfile.c ... mapscript_wrap.c
>
>It doesn't seem correct that every Mapserver source file 
>should have to be listed, though.

Apologies

you also need to add all of the libraries that are needed by mapserver 
and necessary include paths  ie the same as you would pass to 
a cli invocation of gcc to link a module against libmap.a

see your python_source / Modules / setup   file for examples of
how this is done for other modules

HOWEVER  this is a deprecated way of building extension modules
unfortunately because mapserver can be configured in a multitude 
of different configurations it is difficult to come up with a generic
python distutils script which would make this trivial.

I have put a python script at 
http://www.vso.cape.com/~nhv/files/python/mapscript/setup.py

That I use to build a fairly 'stock' python mapscript module
on Cygwin that might just work for you and can at least  be used as a 
'template' for building a python mapscript on other systems

YMMV

Cheers

Norman



More information about the MapServer-users mailing list