Opened 16 years ago

Closed 13 years ago

#434 closed defect (wontfix)

python swig bindings for 7.0 svn noyt working on ubuntu install

Reported by: mulligan Owned by: grass-dev@…
Priority: major Milestone: 7.0.0
Component: Python Version: svn-trunk
Keywords: python swig Cc:
CPU: x86-32 Platform: Linux

Description

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'

Change History (5)

in reply to:  description comment:1 by glynn, 16 years ago

Replying to mulligan:

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:

The Python bindings have recently been split into multiple packages, one for each GRASS library, but the test script wasn't updated.

Fixed in r35429.

comment:2 by mulligan, 16 years ago

Hi

Just updated to rev 35437 and still not getting the python_grass7.py files written

here is the output of sudo make:

Many thanks for any further insights

Mark

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 -fno-stack-protector -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 -fno-stack-protector -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 -fno-stack-protector -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 -fno-stack-protector -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 -fno-stack-protector -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 -fno-stack-protector -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 -fno-stack-protector -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 -fno-stack-protector -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 -fno-stack-protector -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 -fno-stack-protector -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. make[1]: Leaving directory `/usr/local/src/grass_trunk/swig/python'

in reply to:  2 comment:3 by glynn, 16 years ago

Replying to mulligan:

Just updated to rev 35437 and still not getting the python_grass7.py files written

That's correct. There isn't a python_grass7 module any more; instead there is a "swig" module with 10 separate sub-modules named:

utils date grass math proj imagery vector raster display stats

These can be imported individually with e.g. "import swig.grass", or you can import all of them with "import swig" (then use e.g. swig.grass.G_gisinit etc), or you can use e.g. "from swig.grass import *" to import all names from a module. You can do the latter for multiple modules, but AFAIK, there's no way to import names from all sub-modules of a module with a single command. OTOH, it wouldn't be hard to add an "all" sub-module which does "from <submodule> import *" for each submodule.

Suggestions about the ideal structure for the Python interface are welcome. AFAICT, the previous structure was just the quickest way to get something working, rather than an explicit design choice.

here is the output of sudo make:

That's a successful compilation.

comment:4 by neteler, 16 years ago

I have added Glynn's notes in

trunk/swig/python/grasspython.dox

With

make htmldocs
 or
make pdfdocs

the (limited) documentation can be generated (requires doxygen/graphviz).

Markus

comment:5 by martinl, 13 years ago

Resolution: wontfix
Status: newclosed

Swig has been replaced by ctypes library some months ago. Closing as invalid.

Note: See TracTickets for help on using tickets.