[GRASS-SVN] r65924 - grass-addons/grass7/gui/wxpython/wx.metadata

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 13 02:24:49 PDT 2015


Author: krejcmat
Date: 2015-08-13 02:24:49 -0700 (Thu, 13 Aug 2015)
New Revision: 65924

Added:
   grass-addons/grass7/gui/wxpython/wx.metadata/dependency.py
Modified:
   grass-addons/grass7/gui/wxpython/wx.metadata/Makefile
Log:
addons wx.metadata: chck dependency from Makefile

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/Makefile
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/Makefile	2015-08-13 07:18:35 UTC (rev 65923)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/Makefile	2015-08-13 09:24:49 UTC (rev 65924)
@@ -1,5 +1,12 @@
 MODULE_TOPDIR = ..
 
+SHELL_OUTPUT := $(shell python dependency.py 2>&1)
+ifeq ($(filter File dependency.py,$(SHELL_OUTPUT)),)
+  $(info $(SHELL_OUTPUT))
+else
+  $(error $(SHELL_OUTPUT))
+endif
+
 SUBDIRS = \
 	mdlib \
 	r.info.iso \

Added: grass-addons/grass7/gui/wxpython/wx.metadata/dependency.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/dependency.py	                        (rev 0)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/dependency.py	2015-08-13 09:24:49 UTC (rev 65924)
@@ -0,0 +1,46 @@
+owslib=False
+try:
+    import owslib
+    owslib=True
+except:
+    print'owslib library is missing. Check requirements on the manual page < https://grasswiki.osgeo.org/wiki/ISO/INSPIRE_Metadata_Support >'
+
+if owslib:
+    import owslib
+    owsvs= owslib.__version__
+    try:
+        from owslib.iso import *
+
+        MD_Metadata()
+    except:
+        print ('Installed version of owslib library is < %s >.'%owsvs)
+        print('owslib >=0.9 is required. Check requirements on the manual page < https://grasswiki.osgeo.org/wiki/ISO/INSPIRE_Metadata_Support >')
+
+
+try:
+    import jinja2
+except:
+    print'jinja2 library is missing. Check requirements on the manual page < https://grasswiki.osgeo.org/wiki/ISO/INSPIRE_Metadata_Support >'
+pycsw=False
+
+try:
+    import pycsw
+    pycsw=True
+except:
+    print('pycsw library is missing. Check requirements on the manual page < https://grasswiki.osgeo.org/wiki/ISO/INSPIRE_Metadata_Support >')
+
+
+if pycsw:
+    import pycsw
+    cswvs= pycsw.__version__
+    try:
+        from pycsw.core import admin
+    except:
+        print ('Installed version of pycsw library is < %s >.'%cswvs)
+        print('pycsw >=2.0 is required. Check requirements on the manual page < https://grasswiki.osgeo.org/wiki/ISO/INSPIRE_Metadata_Support >')
+
+
+from owslib.iso import *
+import jinja2
+from pycsw.core import admin
+



More information about the grass-commit mailing list