[GRASS-dev] Re: [GRASS GIS] #434: python swig bindings for 7.0 svn noyt working on ubuntu install
#434: python swig bindings for 7.0 svn noyt working on ubuntu install ---+ Reporter: mulligan | Owner: grass-dev@… Type: defect| Status: closed Priority: major | Milestone: 7.0.0 Component: Python| Version: svn-trunk Resolution: wontfix |Keywords: python swig Platform: Linux | Cpu: x86-32 ---+ Changes (by martinl): * status: new = closed * resolution: = wontfix Comment: Swig has been replaced by ctypes library some months ago. Closing as invalid. -- Ticket URL: https://trac.osgeo.org/grass/ticket/434#comment:5 GRASS GIS http://grass.osgeo.org ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
[GRASS-dev] Re: [GRASS GIS] #434: python swig bindings for 7.0 svn noyt working on ubuntu install
#434: python swig bindings for 7.0 svn noyt working on ubuntu install ---+ Reporter: mulligan | Owner: grass-dev@lists.osgeo.org Type: defect| Status: new Priority: major | Milestone: 7.0.0 Component: Python| Version: svn-trunk Resolution:|Keywords: python swig Platform: Linux | Cpu: x86-32 ---+ Comment (by glynn): Replying to [comment:2 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. -- Ticket URL: http://trac.osgeo.org/grass/ticket/434#comment:3 GRASS GIS http://grass.osgeo.org ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
[GRASS-dev] Re: [GRASS GIS] #434: python swig bindings for 7.0 svn noyt working on ubuntu install
#434: python swig bindings for 7.0 svn noyt working on ubuntu install ---+ Reporter: mulligan | Owner: grass-dev@lists.osgeo.org Type: defect| Status: new Priority: major | Milestone: 7.0.0 Component: Python| Version: svn-trunk Resolution:|Keywords: python swig Platform: Linux | Cpu: x86-32 ---+ Comment (by neteler): 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 -- Ticket URL: http://trac.osgeo.org/grass/ticket/434#comment:4 GRASS GIS http://grass.osgeo.org ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
[GRASS-dev] Re: [GRASS GIS] #434: python swig bindings for 7.0 svn noyt working on ubuntu install
#434: python swig bindings for 7.0 svn noyt working on ubuntu install ---+ Reporter: mulligan | Owner: grass-dev@lists.osgeo.org Type: defect| Status: new Priority: major | Milestone: 7.0.0 Component: Python| Version: svn-trunk Resolution:|Keywords: python swig Platform: Linux | Cpu: x86-32 ---+ Comment (by glynn): Replying to [ticket:434 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. -- Ticket URL: http://trac.osgeo.org/grass/ticket/434#comment:1 GRASS GIS http://grass.osgeo.org ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
[GRASS-dev] Re: [GRASS GIS] #434: python swig bindings for 7.0 svn noyt working on ubuntu install
#434: python swig bindings for 7.0 svn noyt working on ubuntu install ---+ Reporter: mulligan | Owner: grass-dev@lists.osgeo.org Type: defect| Status: new Priority: major | Milestone: 7.0.0 Component: Python| Version: svn-trunk Resolution:|Keywords: python swig Platform: Linux | Cpu: x86-32 ---+ Comment (by mulligan): 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-