Skip to content
Permalink
Browse files
Removed the unnecessary setted paths
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13682 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
brushtyler committed Jun 7, 2010
1 parent 04cfd55 commit 1ec6dd1c8c0b1080ed1d6029dffd98905162ebfe
@@ -25,25 +25,31 @@
# Initialize Qt resources from file resources_rc.py
import resources_rc

# Import required modules and if missing show the right name of them
# Import required modules and if missing show the right module's name
req_mods = { "osgeo": "osgeo [python-gdal]" }
for k, v in req_mods.iteritems():
try:
exec( "import %s" % k )
except ImportError, e:
errorStr = str(e)
if len(v) > 0:
errorStr = errorStr.replace( k, v )
raise ImportError( errorStr )

# Set up current path, so that we know where to look for modules
import os.path, sys
currentPath = os.path.dirname( __file__ )
sys.path.append( os.path.abspath(os.path.dirname( __file__ ) + '/tools' ) )
import doBuildVRT, doContour, doRasterize, doPolygonize, doMerge, doSieve, doProximity, doNearBlack, doWarp, doGrid, doTranslate, doClipper
import doInfo, doProjection, doOverview, doRgbPct, doPctRgb, doSettings, doAbout

import GdalTools_utils as Utils

try:
# Set up current path, so that we know where to look for modules
import os.path, sys
currentPath = os.path.dirname( __file__ )
modulesPath = os.path.abspath( currentPath + '/tools' )
sys.path.append( modulesPath )

import GdalTools_utils as Utils

import doBuildVRT, doContour, doRasterize, doPolygonize, doMerge, doSieve, doProximity, doNearBlack
import doWarp, doGrid, doTranslate, doClipper, doInfo, doProjection, doOverview, doRgbPct, doPctRgb
import doSettings, doAbout

sys.path.remove( modulesPath )

except ImportError, e:
error_str = str(e)
error_mod = error_str.replace( "No module named ", "" )
if req_mods.has_key( error_mod ):
error_str = error_str.replace( error_mod, req_mods[error_mod] )
raise ImportError( error_str )


class GdalTools:

@@ -1,9 +1,11 @@
FILE(GLOB INIT_FILE __init__.py)
FILE(GLOB PY_FILES *.py)
FILE(GLOB UI_FILES *.ui)

PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES})

ADD_CUSTOM_TARGET(gdaltools_tools ALL DEPENDS ${PYUI_FILES})

INSTALL(FILES ${INIT_FILE} DESTINATION ${QGIS_DATA_DIR}/python/plugins/GdalTools/tools)
INSTALL(FILES ${PY_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/GdalTools/tools)
INSTALL(FILES ${PYUI_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/GdalTools/tools)
Empty file.
@@ -6,13 +6,19 @@
from qgis.gui import *

from ui_dialogAbout import Ui_GdalToolsAboutDialog as Ui_Dialog

# Set up current path, so that we know where to look for version
import os.path, sys
# Set up current path, so that we know where to look for init file
currentPath = os.path.dirname( __file__ )
sys.path.append( os.path.abspath(os.path.dirname( __file__ )[:-6] ) )
# prepended the dir, to avoid conflicts with other __init__ modules in search path
pluginPath = os.path.abspath( currentPath + "/.." )
sys.path.append( pluginPath )

# prepended the module name, to avoid conflicts with other __init__ modules in search path
from GdalTools.__init__ import version

sys.path.remove( pluginPath )


class GdalToolsAboutDialog(QDialog, Ui_Dialog):

def __init__(self, iface):

0 comments on commit 1ec6dd1

Please sign in to comment.