[GRASS-SVN] r66407 - in grass-addons/grass7/gui/wxpython/wx.metadata: db.csw.admin g.gui.cswbrowser g.gui.metadata mdlib r.info.iso t.info.iso v.info.iso

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 4 03:45:59 PDT 2015


Author: martinl
Date: 2015-10-04 03:45:59 -0700 (Sun, 04 Oct 2015)
New Revision: 66407

Modified:
   grass-addons/grass7/gui/wxpython/wx.metadata/db.csw.admin/db.csw.admin.py
   grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.cswbrowser/g.gui.cswbrowser.py
   grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.py
   grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/mdgrass.py
   grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/mdpdffactory.py
   grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py
   grass-addons/grass7/gui/wxpython/wx.metadata/t.info.iso/t.info.iso.py
   grass-addons/grass7/gui/wxpython/wx.metadata/v.info.iso/v.info.iso.py
Log:
wx.metadata: fix compilation issues (make)

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/db.csw.admin/db.csw.admin.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/db.csw.admin/db.csw.admin.py	2015-10-04 09:46:05 UTC (rev 66406)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/db.csw.admin/db.csw.admin.py	2015-10-04 10:45:59 UTC (rev 66407)
@@ -121,15 +121,11 @@
 from grass.script import core as grass
 from grass.pygrass.utils import get_lib_path
 
-def load_mdlib(libs):
-    for lib in libs:
-        path = get_lib_path(modname=os.path.join('wx.metadata','mdlib') ,libname=lib)
-        if path is not None and path not in sys.path:
-            sys.path.append(path)
-        else:
-            import grass.script as grass
-            grass.fatal("Fatal error: library < %s > not found "%lib)
-load_mdlib(['cswutil'])
+path = get_lib_path(modname='wx.metadata', libname='mdlib')
+if path is not None and path not in sys.path:
+    sys.path.append(path)
+elif path is  None:
+    grass.fatal("Fatal error: library < %s > not found " % 'mdlib')
 
 import getopt
 from cswutil import *

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.cswbrowser/g.gui.cswbrowser.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.cswbrowser/g.gui.cswbrowser.py	2015-10-04 09:46:05 UTC (rev 66406)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.cswbrowser/g.gui.cswbrowser.py	2015-10-04 10:45:59 UTC (rev 66407)
@@ -14,18 +14,16 @@
 import os
 
 from grass.pygrass.utils import get_lib_path
+import grass.script as grass
 
-def load_mdlib(libs):
-    for lib in libs:
-        path = get_lib_path(modname=os.path.join('wx.metadata','mdlib') ,libname=lib)
-        if path is not None and path not in sys.path:
-            sys.path.append(path)
-        elif path is  None:
-            grass.fatal("Fatal error: library < %s > not found "%lib)
-load_mdlib(['cswlib'])
+path = get_lib_path(modname='wx.metadata', libname='mdlib')
+if path is not None and path not in sys.path:
+    sys.path.append(path)
+elif path is  None:
+    grass.fatal("Fatal error: library < %s > not found " % 'mdlib')
+
 import wx
 from cswlib import CSWBrowserPanel, CSWConnectionPanel
-import grass.script as grass
 
 class CswBrowserMainDialog(wx.Frame):
     def __init__(self):

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.py	2015-10-04 09:46:05 UTC (rev 66406)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.py	2015-10-04 10:45:59 UTC (rev 66407)
@@ -28,24 +28,14 @@
 from grass.pydispatch import dispatcher
 from core.gcmd import RunCommand, GError, GMessage
 import grass.temporal as tgis
-try:
-    from datacatalog.catalog import DataCatalog as datacatalog
-except:
-    try:
-        from lmgr import datacatalog
-    except Exception,e:
-        grass.fatal(e)
+from datacatalog.tree import LocationMapTree
 
-def load_mdlib(libs):
-    for lib in libs:
-        path = get_lib_path(modname=os.path.join('wx.metadata','mdlib') ,libname=lib)
-        if path is not None and path not in sys.path:
-            sys.path.append(path)
-        elif path is  None:
-            grass.fatal("Fatal error: library < %s > not found "%lib)
-load_mdlib(['mdgrass','mdutil','mdeditorfactory','cswlib','mdpdffactory'])
+path = get_lib_path(modname='wx.metadata', libname='mdlib')
+if path is not None and path not in sys.path:
+    sys.path.append(path)
+elif path is  None:
+    grass.fatal("Fatal error: library < %s > not found " % 'mdlib')
 
-
 import mdgrass
 import mdutil
 from mdpdffactory import PdfCreator
@@ -854,7 +844,7 @@
 #===============================================================================
 # DATA CATALOG
 #===============================================================================
-class MdDataCatalog(datacatalog.LocationMapTree):
+class MdDataCatalog(LocationMapTree):
     '''Data catalog for selecting GRASS maps for editing
     '''
 

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/mdgrass.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/mdgrass.py	2015-10-04 09:46:05 UTC (rev 66406)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/mdgrass.py	2015-10-04 10:45:59 UTC (rev 66407)
@@ -27,15 +27,13 @@
 
 from grass.script import core as grass
 from grass.pygrass.utils import get_lib_path
-def load_mdlib(libs):
-    for lib in libs:
-        path = get_lib_path(modname=os.path.join('wx.metadata','mdlib') ,libname=lib)
-        if path is not None and path not in sys.path:
-            sys.path.append(path)
-        elif path is  None:
-            grass.fatal("Fatal error: library < %s > not found "%lib)
-load_mdlib(['mdutil'])
 
+path = get_lib_path(modname='wx.metadata', libname='mdlib')
+if path is not None and path not in sys.path:
+    sys.path.append(path)
+elif path is  None:
+    grass.fatal("Fatal error: library < %s > not found " % 'mdlib')
+
 from lxml import etree
 import StringIO
 import uuid

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/mdpdffactory.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/mdpdffactory.py	2015-10-04 09:46:05 UTC (rev 66406)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/mdpdffactory.py	2015-10-04 10:45:59 UTC (rev 66407)
@@ -6,14 +6,11 @@
 from grass.pygrass.utils import get_lib_path
 from grass.script import core as grass
 
-def load_mdlib(libs):
-    for lib in libs:
-        path = get_lib_path(modname=os.path.join('wx.metadata','mdlib') ,libname=lib)
-        if path is not None and path not in sys.path:
-            sys.path.append(path)
-        elif path is  None:
-            grass.fatal("Fatal error: library < %s > not found "%lib)
-load_mdlib(['pdf','mdlib'])
+path = get_lib_path(modname='wx.metadata', libname='mdlib')
+if path is not None and path not in sys.path:
+    sys.path.append(path)
+elif path is  None:
+    grass.fatal("Fatal error: library < %s > not found " % 'mdlib')
 
 import math
 from reportlab.platypus import Paragraph, Image, Table

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py	2015-10-04 09:46:05 UTC (rev 66406)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py	2015-10-04 10:45:59 UTC (rev 66407)
@@ -43,7 +43,7 @@
 
 def load_mdlib(libs):
     for lib in libs:
-        path = get_lib_path(modname=os.path.join('wx.metadata','mdlib') ,libname=lib)
+        path = get_lib_path(modname='wx.metadata', libname=lib)
         if path is not None and path not in sys.path:
             sys.path.append(path)
         elif path is  None:
@@ -52,7 +52,7 @@
 
 def main():
     # load metadata library
-    load_mdlib(['mdgrass'])
+    load_mdlib(['mdlib'])
     from mdgrass import GrassMD
 
     if not options['output']:

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/t.info.iso/t.info.iso.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/t.info.iso/t.info.iso.py	2015-10-04 09:46:05 UTC (rev 66406)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/t.info.iso/t.info.iso.py	2015-10-04 10:45:59 UTC (rev 66407)
@@ -43,7 +43,7 @@
 
 def load_mdlib(libs):
     for lib in libs:
-        path = get_lib_path(modname=os.path.join('wx.metadata','mdlib') ,libname=lib)
+        path = get_lib_path(modname='wx.metadata' ,libname=lib)
         if path is not None and path not in sys.path:
             sys.path.append(path)
         elif path is  None:
@@ -52,7 +52,7 @@
 
 def main():
     # load metadata library
-    load_mdlib(['mdgrass'])
+    load_mdlib(['mdlib'])
     from mdgrass import GrassMD
 
     if not options['output']:

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/v.info.iso/v.info.iso.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/v.info.iso/v.info.iso.py	2015-10-04 09:46:05 UTC (rev 66406)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/v.info.iso/v.info.iso.py	2015-10-04 10:45:59 UTC (rev 66407)
@@ -42,7 +42,7 @@
 
 def load_mdlib(libs):
     for lib in libs:
-        path = get_lib_path(modname=os.path.join('wx.metadata','mdlib') ,libname=lib)
+        path = get_lib_path(modname='wx.metadata', libname=lib)
         if path is not None and path not in sys.path:
             sys.path.append(path)
         elif path is  None:
@@ -50,7 +50,7 @@
 
 def main():
     # load metadata library
-    load_mdlib(['mdgrass'])
+    load_mdlib(['mdlib'])
     from mdgrass import GrassMD
 
     if not options['output']:



More information about the grass-commit mailing list