[mapserver-users] Please help with Python Mapscript module
Sean Gillies
sgillies at i3.com
Wed Apr 10 08:25:12 PDT 2002
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.
cheers,
Sean
Ben Logan wrote:
> Perhaps no-one saw my last posts? Or does no-one know what to do?
>
> I'm trying to get the Python Mapscript module to compile/link. I have
> run the following commands:
>
> gcc -c mapscript_wrap.c -I/usr/include/python1.5 -o mapscriptcmodule.o
>
> ld -o mapscriptcmodule.so mapscriptcmodule.o -shared ../../libmap.a /usr/local/lib/libproj.a /usr/local/lib/libgdal.1.1.so
>
> and then when I tried to import the mapscript module, Python gave this
> message:
>
> Python 1.5.2 (#1, Mar 3 2001, 01:35:43) [GCC 2.96 20000731 (Red Hat
> Linux 7.1
> 2 on linux-i386
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>
>>>>import mapscript
>>>
> Traceback (innermost last):
> File "<stdin>", line 1, in ?
> File "mapscript.py", line 2, in ?
> import mapscriptc
> ImportError: (Èd at R6/lib/libX11.so.6: shared object not open
>
> Can anyone tell me what I am doing wrong, or is the Python module just
> broken?
>
> Thanks,
> Ben
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sig_business.txt
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20020410/60ba9b4a/attachment.txt>
More information about the MapServer-users
mailing list