[GRASS-SVN] r33473 - in grass/branches/develbranch_6: include swig/python

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 16 23:35:56 EDT 2008


Author: hamish
Date: 2008-09-16 23:35:56 -0400 (Tue, 16 Sep 2008)
New Revision: 33473

Removed:
   grass/branches/develbranch_6/swig/python/interfaces/
Modified:
   grass/branches/develbranch_6/include/Vect.h
   grass/branches/develbranch_6/swig/python/Makefile.in
   grass/branches/develbranch_6/swig/python/python_grass6.i
Log:
SWIG fixes: (merge from trunk; trac #308)
  add/remove missing Vect fn defs;
  pyswig Makefile cleaning;
  include headers directly


Modified: grass/branches/develbranch_6/include/Vect.h
===================================================================
--- grass/branches/develbranch_6/include/Vect.h	2008-09-16 22:07:39 UTC (rev 33472)
+++ grass/branches/develbranch_6/include/Vect.h	2008-09-17 03:35:56 UTC (rev 33473)
@@ -323,6 +323,10 @@
 int Vect_overlay(struct Map_info *, int, struct ilist *, struct ilist *,
 		 struct Map_info *, int, struct ilist *, struct ilist *,
 		 int, struct Map_info *);
+int Vect_overlay_and(struct Map_info *, int, struct ilist *,
+		     struct ilist *, struct Map_info *, int,
+		     struct ilist *, struct ilist *,
+		     struct Map_info *);
 
     /* Graph */
 void Vect_graph_init(GRAPH *, int);
@@ -403,8 +407,6 @@
     /* Read/write lines */
 int V1_read_line_nat(struct Map_info *, struct line_pnts *,
 		     struct line_cats *, long);
-int V1_read_next_line(struct Map_info *, struct line_pnts *,
-		      struct line_cats *);
 int V1_read_next_line_nat(struct Map_info *, struct line_pnts *,
 			  struct line_cats *);
 int V1_read_next_line_ogr(struct Map_info *, struct line_pnts *,
@@ -413,30 +415,29 @@
 		     struct line_cats *, int);
 int V2_read_line_ogr(struct Map_info *, struct line_pnts *,
 		     struct line_cats *, int);
-int V2_read_next_line(struct Map_info *, struct line_pnts *,
-		      struct line_cats *);
 int V2_read_next_line_nat(struct Map_info *, struct line_pnts *,
 			  struct line_cats *);
 int V2_read_next_line_ogr(struct Map_info *, struct line_pnts *,
 			  struct line_cats *);
-int V1_delete_line(struct Map_info *, long);
-int V2_delete_line(struct Map_info *, int);
+/* int V1_delete_line(struct Map_info *, long); */
 int V1_delete_line_nat(struct Map_info *, long);
 int V2_delete_line_nat(struct Map_info *, int);
 long V1_write_line_nat(struct Map_info *, int type, struct line_pnts *,
 		       struct line_cats *);
 long V2_write_line_nat(struct Map_info *, int type, struct line_pnts *,
 		       struct line_cats *);
+#if 0
 long V1_write_line_ogr(struct Map_info *, int type, struct line_pnts *,
 		       struct line_cats *);
-long V1_rewrite_line(struct Map_info *, long offset, int type,
-		     struct line_pnts *, struct line_cats *);
+#endif
 long V1_rewrite_line_nat(struct Map_info *, long offset, int type,
 			 struct line_pnts *, struct line_cats *);
 int V2_rewrite_line_nat(struct Map_info *, int line, int type,
 			struct line_pnts *, struct line_cats *);
+#if 0
 long V1_rewrite_line_ogr(struct Map_info *, long offset, int type,
 			 struct line_pnts *, struct line_cats *);
+#endif
 
     /* Miscellaneous */
 int Vect_build_nat(struct Map_info *, int, FILE *);

Modified: grass/branches/develbranch_6/swig/python/Makefile.in
===================================================================
--- grass/branches/develbranch_6/swig/python/Makefile.in	2008-09-16 22:07:39 UTC (rev 33472)
+++ grass/branches/develbranch_6/swig/python/Makefile.in	2008-09-17 03:35:56 UTC (rev 33473)
@@ -3,32 +3,31 @@
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 include $(MODULE_TOPDIR)/include/Make/Doxygen.make
 
-CFLAGS=-c -fpic -I./ -I$(ARCH_DISTDIR)/include $(GDALCFLAGS) $(PYTHONCFLAGS)
+LIB_NAME = python_grass6
 
-LDFLAGS=-shared -L$(ARCH_LIBDIR) $(GDALLIBS) $(PYTHONLDFLAGS) -lgrass_I -lgrass_Iortho -lgrass_bitmap -lgrass_btree -lgrass_cdhc -lgrass_datetime -lgrass_dbmibase -lgrass_dbmiclient -lgrass_dbmidriver -lgrass_dbstubs -lgrass_dgl -lgrass_display -lgrass_dspf -lgrass_edit -lgrass_form -lgrass_g3d -lgrass_gis -lgrass_gmath -lgrass_gproj -lgrass_interpdata -lgrass_interpfl -lgrass_linkm -lgrass_qtree -lgrass_raster -lgrass_rowio -lgrass_rtree -lgrass_segment -lgrass_shape -lgrass_sites -lgrass_symb -lgrass_trans -lgrass_vask -lgrass_vect -lgrass_psdriver
+CFLAGS=-c -fpic -I. $(ARCH_INC) $(GDALCFLAGS) $(PYTHONCFLAGS)
 
-# TODO: build the NumPtr module. See NumPtr/README.GRASS
-#SUBDIRS = NumPtr
+LDFLAGS=-shared -L$(ARCH_LIBDIR) $(GDALLIBS) $(PYTHONLDFLAGS) $(VECTLIB) $(IMAGERYLIB) $(GMATHLIB) $(GISLIB)
+
 #include $(MODULE_TOPDIR)/include/Make/Dir.make
 
-default: python_grass6.so numptr
+default: _$(LIB_NAME).so numptr
 
 clean:
-	-rm -f *.o *.so python_grass6_wrap.c python_grass6.pyc python_grass6.py
+	-rm -f *.o *.so $(LIB_NAME)_wrap.c $(LIB_NAME).pyc $(LIB_NAME).py
 
 distclean: clean
 	-rm -f Makefile
 
-python_grass6_wrap.c: python_grass6.i
-	$(MAKE) -C interfaces
-	$(SWIG) -python -shadow $<
+$(LIB_NAME)_wrap.c: $(LIB_NAME).i
+	$(SWIG) $(ARCH_INC) -python -shadow $<
 
 
-python_grass6_wrap.o: python_grass6_wrap.c
+$(LIB_NAME)_wrap.o: $(LIB_NAME)_wrap.c
 	$(CC) $(CFLAGS) $(INCLUDE_DIRS) $<
 
-python_grass6.so: python_grass6_wrap.o
-	$(LD) $(LDFLAGS) $< -o _python_grass6.so
+_$(LIB_NAME).so: $(LIB_NAME)_wrap.o
+	$(LD) $(LDFLAGS) $< -o _$(LIB_NAME).so
 
 numptr:
 	$(MAKE) -C NumPtr
@@ -36,3 +35,11 @@
 # doxygen:
 DOXNAME=
 DOXINPUT=grasspython.dox
+
+$(LIB_NAME)_wrap.c: $(ARCH_INCDIR)/gis.h
+$(LIB_NAME)_wrap.c: $(ARCH_INCDIR)/gisdefs.h
+$(LIB_NAME)_wrap.c: $(ARCH_INCDIR)/imagery.h
+$(LIB_NAME)_wrap.c: $(ARCH_INCDIR)/imagedefs.h
+$(LIB_NAME)_wrap.c: $(ARCH_INCDIR)/Vect.h
+$(LIB_NAME)_wrap.c: $(ARCH_INCDIR)/vect/dig_structs.h
+$(LIB_NAME)_wrap.c: $(ARCH_INCDIR)/vect/dig_defines.h

Modified: grass/branches/develbranch_6/swig/python/python_grass6.i
===================================================================
--- grass/branches/develbranch_6/swig/python/python_grass6.i	2008-09-16 22:07:39 UTC (rev 33472)
+++ grass/branches/develbranch_6/swig/python/python_grass6.i	2008-09-17 03:35:56 UTC (rev 33473)
@@ -24,13 +24,13 @@
 
 %include "my_typemaps.i"
 %include "renames.i"
-%include "interfaces/gis.i"
-%include "interfaces/gisdefs.i"
-%include "interfaces/imagery.i"
-%include "interfaces/imagedefs.i"
-%include "interfaces/vect.i"
-%include "interfaces/dig_structs.i"
-%include "interfaces/dig_types.i"
+%include "grass/gis.h"
+%include "grass/gisdefs.h"
+%include "grass/imagery.h"
+%include "grass/imagedefs.h"
+%include "grass/Vect.h"
+%include "grass/vect/dig_structs.h"
+%include "grass/vect/dig_defines.h"
 
 %pythoncode %{
 def G_gisinit(pgm):



More information about the grass-commit mailing list