[GRASS-dev] [GRASS GIS] #434: python swig bindings for 7.0 svn noyt
working on ubuntu install
GRASS GIS
trac at osgeo.org
Thu Jan 15 17:08:01 EST 2009
#434: python swig bindings for 7.0 svn noyt working on ubuntu install
-------------------------+--------------------------------------------------
Reporter: mulligan | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Python | Version: svn-trunk
Keywords: python swig | Platform: Linux
Cpu: x86-32 |
-------------------------+--------------------------------------------------
I have successfully built grass 7.0 svn today on ubuntu 8.04 and it works
fine. I have followed the instructions here
http://svn.osgeo.org/grass/grass/trunk/swig/python/README to make the
python swig bindings with the output given below
The process does noy seem to build the python_grass7.py required and so
when i run python test.py as indicated I get this:
File "test.py", line 8, in <module>
import python_grass7 as g7lib
ImportError: No module named python_grass7
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 38,
in apport_excepthook
from apport.packaging_impl import impl as packaging
File "/usr/lib/python2.5/site-packages/apport/__init__.py", line 1, in
<module>
from apport.report import Report
File "/usr/lib/python2.5/site-packages/apport/report.py", line 14, in
<module>
import subprocess, tempfile, os.path, urllib, re, pwd, grp, os, sys
File "/usr/lib/python2.5/tempfile.py", line 33, in <module>
from random import Random as _Random
File "/usr/lib/python2.5/random.py", line 43, in <module>
from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as
_ceil
File "/usr/local/src/grass_trunk/swig/python/math.py", line 7, in
<module>
import _math
ImportError: No module named _math
Original exception was:
Traceback (most recent call last):
File "test.py", line 8, in <module>
import python_grass7 as g7lib
ImportError: No module named python_grass7
Many thanks
_______________________________________________________________
make /usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/etc/python/swig
make[1]: Entering directory `/usr/local/src/grass_trunk/swig/python'
make[1]: `/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig' is up to date.
make[1]: Leaving directory `/usr/local/src/grass_trunk/swig/python'
make /usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/_utils.so /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/_date.so /usr/local/src/grass_trunk/dist.i686-
pc-linux-gnu/etc/python/swig/_grass.so /usr/local/src/grass_trunk/dist.
i686-pc-linux-gnu/etc/python/swig/_math.so
/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/etc/python/swig/_proj.so
/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/_imagery.so /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/_vector.so /usr/local/src/grass_trunk/dist.i686-
pc-linux-gnu/etc/python/swig/_raster.so /usr/local/src/grass_trunk/dist.
i686-pc-linux-gnu/etc/python/swig/_display.so
/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/_stats.so /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/utils.py /usr/local/src/grass_trunk/dist.i686-
pc-linux-gnu/etc/python/swig/date.py /usr/local/src/grass_trunk/dist.i686-
pc-linux-gnu/etc/python/swig/grass.py /usr/local/src/grass_trunk/dist.
i686-pc-linux-gnu/etc/python/swig/math.py /usr/local/src/grass_trunk/dist.
i686-pc-linux-gnu/etc/python/swig/proj.py /usr/local/src/grass_trunk/dist.
i686-pc-linux-gnu/etc/python/swig/imagery.py
/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/vector.py /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/raster.py /usr/local/src/grass_trunk/dist.i686-
pc-linux-gnu/etc/python/swig/display.py /usr/local/src/grass_trunk/dist.
i686-pc-linux-gnu/etc/python/swig/stats.py
/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/__init__.py /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/utils.pyc /usr/local/src/grass_trunk/dist.i686-
pc-linux-gnu/etc/python/swig/date.pyc /usr/local/src/grass_trunk/dist.
i686-pc-linux-gnu/etc/python/swig/grass.pyc
/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/etc/python/swig/math.pyc
/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/etc/python/swig/proj.pyc
/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/imagery.pyc /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/vector.pyc /usr/local/src/grass_trunk/dist.i686-
pc-linux-gnu/etc/python/swig/raster.pyc /usr/local/src/grass_trunk/dist.
i686-pc-linux-gnu/etc/python/swig/display.pyc
/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/stats.pyc /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/__init__.pyc
make[1]: Entering directory `/usr/local/src/grass_trunk/swig/python'
/usr/bin/swig -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include
-python -module utils -shadow utils.i
test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu
gcc -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include -g -Wall
-fPIC -I/usr/include/python2.5 -I/usr/include/python2.5
-DPACKAGE=\""grasslibs"\" -I/usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/include -o OBJ.i686-pc-linux-gnu/utils_wrap.o -c utils_wrap.c
gcc -shared -o _utils.so -L/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/lib -Wl,--export-dynamic -Wl,-rpath-
link,/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/lib/python2.5/config -lpthread -ldl -lutil -lm -lpython2.5 OBJ.
i686-pc-linux-gnu/utils_wrap.o
/usr/bin/install -c _utils.so /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/_utils.so
/usr/bin/swig -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include
-python -module date -shadow date.i
gcc -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include -g -Wall
-fPIC -I/usr/include/python2.5 -I/usr/include/python2.5
-DPACKAGE=\""grasslibs"\" -I/usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/include -o OBJ.i686-pc-linux-gnu/date_wrap.o -c date_wrap.c
gcc -shared -o _date.so -L/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/lib -Wl,--export-dynamic -Wl,-rpath-
link,/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/lib/python2.5/config -lpthread -ldl -lutil -lm -lpython2.5 OBJ.
i686-pc-linux-gnu/date_wrap.o -lgrass_datetime
/usr/bin/install -c _date.so /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/_date.so
/usr/bin/swig -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include
-python -module grass -shadow grass.i
gcc -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include -g -Wall
-fPIC -I/usr/include/python2.5 -I/usr/include/python2.5
-DPACKAGE=\""grasslibs"\" -I/usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/include -o OBJ.i686-pc-linux-gnu/grass_wrap.o -c grass_wrap.c
gcc -shared -o _grass.so -L/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/lib -Wl,--export-dynamic -Wl,-rpath-
link,/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/lib/python2.5/config -lpthread -ldl -lutil -lm -lpython2.5 OBJ.
i686-pc-linux-gnu/grass_wrap.o -lgrass_gis -lgrass_datetime -lz
/usr/bin/install -c _grass.so /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/_grass.so
/usr/bin/swig -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include
-python -module math -shadow math.i
gcc -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include -g -Wall
-fPIC -I/usr/include/python2.5 -I/usr/include/python2.5
-DPACKAGE=\""grasslibs"\" -I/usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/include -o OBJ.i686-pc-linux-gnu/math_wrap.o -c math_wrap.c
gcc -shared -o _math.so -L/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/lib -Wl,--export-dynamic -Wl,-rpath-
link,/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/lib/python2.5/config -lpthread -ldl -lutil -lm -lpython2.5 OBJ.
i686-pc-linux-gnu/math_wrap.o -lgrass_gmath -lgrass_gis -lgrass_datetime
-lz
/usr/bin/install -c _math.so /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/_math.so
/usr/bin/swig -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include
-python -module proj -shadow proj.i
gcc -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include -g -Wall
-fPIC -I/usr/include/python2.5 -I/usr/include/python2.5
-DPACKAGE=\""grasslibs"\" -I/usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/include -o OBJ.i686-pc-linux-gnu/proj_wrap.o -c proj_wrap.c
gcc -shared -o _proj.so -L/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/lib -Wl,--export-dynamic -Wl,-rpath-
link,/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/lib/python2.5/config -lpthread -ldl -lutil -lm -lpython2.5 OBJ.
i686-pc-linux-gnu/proj_wrap.o -lgrass_gproj -lgrass_gis -lgrass_datetime
-lz -lproj -L/usr/local/lib -lgdal
/usr/bin/install -c _proj.so /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/_proj.so
/usr/bin/swig -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include
-python -module imagery -shadow imagery.i
gcc -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include -g -Wall
-fPIC -I/usr/include/python2.5 -I/usr/include/python2.5
-DPACKAGE=\""grasslibs"\" -I/usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/include -o OBJ.i686-pc-linux-gnu/imagery_wrap.o -c
imagery_wrap.c
gcc -shared -o _imagery.so -L/usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/lib -Wl,--export-dynamic -Wl,-rpath-
link,/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/lib/python2.5/config -lpthread -ldl -lutil -lm -lpython2.5 OBJ.
i686-pc-linux-gnu/imagery_wrap.o -lgrass_imagery -lgrass_gis
-lgrass_datetime -lz
/usr/bin/install -c _imagery.so /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/_imagery.so
/usr/bin/swig -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include
-python -module vector -shadow vector.i
gcc -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include -g -Wall
-fPIC -I/usr/include/python2.5 -I/usr/include/python2.5
-DPACKAGE=\""grasslibs"\" -I/usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/include -o OBJ.i686-pc-linux-gnu/vector_wrap.o -c vector_wrap.c
gcc -shared -o _vector.so -L/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/lib -Wl,--export-dynamic -Wl,-rpath-
link,/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/lib/python2.5/config -lpthread -ldl -lutil -lm -lpython2.5 OBJ.
i686-pc-linux-gnu/vector_wrap.o -lgrass_vect -lgrass_dbmibase -lgrass_gis
-lgrass_datetime -lz -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gis
-lgrass_datetime -lz -lgrass_gis -lgrass_datetime -lz
-lgrass_dgl -lgrass_dig2 -lgrass_gis -lgrass_datetime -lz
-lgrass_rtree -lgrass_gis -lgrass_datetime -lz -lgrass_linkm
-lgrass_rtree -lgrass_dig2 -lgrass_gis -lgrass_datetime -lz
-lgrass_rtree -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient
-lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz -lgrass_gis
-lgrass_datetime -lz -lgrass_dbmibase -lgrass_gis -lgrass_datetime
-lz -L/usr/local/lib -lgdal
/usr/bin/install -c _vector.so /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/_vector.so
/usr/bin/swig -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include
-python -module raster -shadow raster.i
gcc -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include -g -Wall
-fPIC -I/usr/include/python2.5 -I/usr/include/python2.5
-DPACKAGE=\""grasslibs"\" -I/usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/include -o OBJ.i686-pc-linux-gnu/raster_wrap.o -c raster_wrap.c
gcc -shared -o _raster.so -L/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/lib -Wl,--export-dynamic -Wl,-rpath-
link,/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/lib/python2.5/config -lpthread -ldl -lutil -lm -lpython2.5 OBJ.
i686-pc-linux-gnu/raster_wrap.o -lgrass_raster -lgrass_pngdriver
-lgrass_driver -lgrass_gis -lgrass_datetime -lz -lgrass_gis
-lgrass_datetime -lz -lpng -lz -lm -lgrass_psdriver -lgrass_driver
-lgrass_gis -lgrass_datetime -lz -lgrass_gis -lgrass_datetime -lz
-lgrass_driver -lgrass_gis -lgrass_datetime -lz -lgrass_gis
-lgrass_datetime -lz
/usr/bin/install -c _raster.so /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/_raster.so
/usr/bin/swig -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include
-python -module display -shadow display.i
gcc -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include -g -Wall
-fPIC -I/usr/include/python2.5 -I/usr/include/python2.5
-DPACKAGE=\""grasslibs"\" -I/usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/include -o OBJ.i686-pc-linux-gnu/display_wrap.o -c
display_wrap.c
gcc -shared -o _display.so -L/usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/lib -Wl,--export-dynamic -Wl,-rpath-
link,/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/lib/python2.5/config -lpthread -ldl -lutil -lm -lpython2.5 OBJ.
i686-pc-linux-gnu/display_wrap.o -lgrass_display -lgrass_gis
-lgrass_datetime -lz -lgrass_raster -lgrass_pngdriver -lgrass_driver
-lgrass_gis -lgrass_datetime -lz -lgrass_gis -lgrass_datetime -lz
-lpng -lz -lm -lgrass_psdriver -lgrass_driver -lgrass_gis
-lgrass_datetime -lz -lgrass_gis -lgrass_datetime -lz
-lgrass_driver -lgrass_gis -lgrass_datetime -lz -lgrass_gis
-lgrass_datetime -lz
/usr/bin/install -c _display.so /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/_display.so
/usr/bin/swig -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include
-python -module stats -shadow stats.i
gcc -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include -g -Wall
-fPIC -I/usr/include/python2.5 -I/usr/include/python2.5
-DPACKAGE=\""grasslibs"\" -I/usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/include -o OBJ.i686-pc-linux-gnu/stats_wrap.o -c stats_wrap.c
gcc -shared -o _stats.so -L/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/lib -Wl,--export-dynamic -Wl,-rpath-
link,/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/lib
-L/usr/lib/python2.5/config -lpthread -ldl -lutil -lm -lpython2.5 OBJ.
i686-pc-linux-gnu/stats_wrap.o -lgrass_stats -lgrass_gis -lgrass_datetime
-lz
/usr/bin/install -c _stats.so /usr/local/src/grass_trunk/dist.i686-pc-
linux-gnu/etc/python/swig/_stats.so
/usr/bin/install -c -m 644 utils.py /usr/local/src/grass_trunk/dist.i686-
pc-linux-gnu/etc/python/swig/utils.py
/usr/bin/install -c -m 644 date.py /usr/local/src/grass_trunk/dist.i686-
pc-linux-gnu/etc/python/swig/date.py
/usr/bin/install -c -m 644 grass.py /usr/local/src/grass_trunk/dist.i686-
pc-linux-gnu/etc/python/swig/grass.py
/usr/bin/install -c -m 644 math.py /usr/local/src/grass_trunk/dist.i686-
pc-linux-gnu/etc/python/swig/math.py
/usr/bin/install -c -m 644 proj.py /usr/local/src/grass_trunk/dist.i686-
pc-linux-gnu/etc/python/swig/proj.py
/usr/bin/install -c -m 644 imagery.py /usr/local/src/grass_trunk/dist.
i686-pc-linux-gnu/etc/python/swig/imagery.py
/usr/bin/install -c -m 644 vector.py /usr/local/src/grass_trunk/dist.
i686-pc-linux-gnu/etc/python/swig/vector.py
/usr/bin/install -c -m 644 raster.py /usr/local/src/grass_trunk/dist.
i686-pc-linux-gnu/etc/python/swig/raster.py
/usr/bin/install -c -m 644 display.py /usr/local/src/grass_trunk/dist.
i686-pc-linux-gnu/etc/python/swig/display.py
/usr/bin/install -c -m 644 stats.py /usr/local/src/grass_trunk/dist.i686-
pc-linux-gnu/etc/python/swig/stats.py
make[1]: `/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/__init__.py' is up to date.
python -m py_compile /usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/utils.py
python -m py_compile /usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/date.py
python -m py_compile /usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/grass.py
python -m py_compile /usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/math.py
python -m py_compile /usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/proj.py
python -m py_compile /usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/imagery.py
python -m py_compile /usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/vector.py
python -m py_compile /usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/raster.py
python -m py_compile /usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/display.py
python -m py_compile /usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/stats.py
make[1]: `/usr/local/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/__init__.pyc' is up to date.
rm _date.so _math.so _display.so _grass.so _raster.so _utils.so _stats.so
_vector.so _imagery.so _proj.so
make[1]: Leaving directory `/usr/local/src/grass_trunk/swig/python'
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/434>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list