From: vsr Date: Thu, 14 Jun 2012 15:46:41 +0000 (+0000) Subject: Minor correction to the previous integration: take into account current value of... X-Git-Tag: V6_6_0a1~61 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c5155969efc694a450d9aabab02a1a577a922cf6;p=modules%2Fgui.git Minor correction to the previous integration: take into account current value of VTK_AUTOLOAD_PATH env variable --- diff --git a/bin/gui_setenv.py b/bin/gui_setenv.py index ee96fbcdb..4cadb294e 100644 --- a/bin/gui_setenv.py +++ b/bin/gui_setenv.py @@ -19,13 +19,16 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -import os +import os, re # ----------------------------------------------------------------------------- def set_env( args ): """Add environment required for GUI module""" - os.environ[ 'VTK_AUTOLOAD_PATH' ] = os.path.join( os.getenv("GUI_ROOT_DIR"), "lib", "paraview" ) + vtk_overloads_dir = os.path.join( os.getenv( "GUI_ROOT_DIR" ), "lib", "paraview" ) + dirs = re.split( ":|;", os.getenv( 'VTK_AUTOLOAD_PATH', vtk_overloads_dir ) ) + if vtk_overloads_dir not in dirs: dirs[0:0] = [vtk_overloads_dir] + os.environ['VTK_AUTOLOAD_PATH'] = os.pathsep.join(dirs) return