[mapserver-users] Please help with Python Mapscript module

Ben Logan ben at wblogan.net
Fri Apr 12 02:51:46 PDT 2002


On Wed, Apr 10, 2002 at 09:25:12AM -0600, Sean Gillies wrote:
> Ben,
> 
> My recommendation is that you build the Python mapscript module
> using Python distutils rather than manually compiling.
> 
> Here is a great intro document to building Python extension mods.
> An hour or so of reading this will reward you many times over:
> 
>    http://www.python.org/doc/current/ext/ext.html
> 
> Next, upgrade to Python 2.1+ so you can use the newest Python
> distutils.  Read all about distutils at:
> 
>    http://www.python.org/doc/current/lib/module-distutils.html
> 
> Steve Lime has written a setup.py file that should be included
> in your Python mapscript source.  After reading the documents
> I've referenced, you'll be able to adapt this setup file to
> your own needs and will build the module easily.
> 
> Hope this helps you.  I've only built Python mapscript on Win32
> so don't have any Redhat specifics.

Thanks to everyone who responded, I finally got it to work.  I didn't
have a setup.py in my MapServer distro, but I found one at
http://www.vso.cape.com/~nhv/files/python/mapscript/setup.py by
searching the list archives.  After modifying it for my setup, I was
still getting an error about a missing __init__.  In setup.py,
mapscript and mapscriptc are spelled using studly caps and that is
apparently what was causing the problem.  Substituting MapScript for
mapscript in setup.py fixed the problem, and the module is now
successfully imported.

Now if I can just figure out how to use it... :)

Thanks again,
Ben

-- 
Ben Logan: ben at wblogan dot net
OpenPGP Key KeyID: A1ADD1F0



More information about the MapServer-users mailing list