[GRASS-SVN] r35429 - grass/trunk/swig/python

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jan 16 04:54:26 EST 2009


Author: glynn
Date: 2009-01-16 04:54:25 -0500 (Fri, 16 Jan 2009)
New Revision: 35429

Modified:
   grass/trunk/swig/python/Makefile
   grass/trunk/swig/python/test.py
Log:
Retain local copies of modules
Fix test script


Modified: grass/trunk/swig/python/Makefile
===================================================================
--- grass/trunk/swig/python/Makefile	2009-01-16 05:23:44 UTC (rev 35428)
+++ grass/trunk/swig/python/Makefile	2009-01-16 09:54:25 UTC (rev 35429)
@@ -27,7 +27,7 @@
 
 EXTRA_SWIG = my_typemaps.i common.i
 EXTRA_CFLAGS = $(PYMOD_CFLAGS)
-EXTRA_CLEAN_FILES := $(foreach M,$(MODULES),$(M)_wrap.o $(M)_wrap.c $(M).pyc $(M).py)
+EXTRA_CLEAN_FILES := $(foreach M,$(MODULES),$(M)_wrap.o $(M)_wrap.c $(M).pyc $(M).py _$(M).so)
 CLEAN_SUBDIRS = NumPtr
 
 include $(MODULE_TOPDIR)/include/Make/Python.make
@@ -59,8 +59,10 @@
 
 .PHONY: numptr
 
-.KEEP: $(patsubst %,$(OBJDIR)/%_wrap.o,$(MODULES))
+.SECONDARY: $(patsubst %,$(OBJDIR)/%_wrap.o,$(MODULES))
 
+.SECONDARY: $(patsubst %,_%.so,$(MODULES))
+
 date_wrap.c: $(ARCH_INCDIR)/datetime.h
 date_wrap.c: $(ARCH_INCDIR)/P_datetime.h
 grass_wrap.c: $(ARCH_INCDIR)/gis.h

Modified: grass/trunk/swig/python/test.py
===================================================================
--- grass/trunk/swig/python/test.py	2009-01-16 05:23:44 UTC (rev 35428)
+++ grass/trunk/swig/python/test.py	2009-01-16 09:54:25 UTC (rev 35429)
@@ -5,7 +5,7 @@
 
 
 import os, sys
-import python_grass7 as g7lib
+import grass
 
 if not os.environ.has_key("GISBASE"):
     print "You must be in GRASS GIS to run this program."
@@ -14,16 +14,16 @@
 rname = 'elevation.dem'
 mapset = 'PERMANENT'
 
-g7lib.G_gisinit('')
-g7lib.G_find_cell2(rname,'')
+grass.G_gisinit('')
+grass.G_find_cell2(rname,'')
 
 print mapset
 
 print 'prints 0 if map was found'
 
 print 'roads:'
-print g7lib.G_raster_map_type('roads',mapset)
+print grass.G_raster_map_type('roads',mapset)
 
 print 'elevation.dem:'
-print g7lib.G_raster_map_type(rname,mapset)
+print grass.G_raster_map_type(rname,mapset)
 



More information about the grass-commit mailing list