From c5155969efc694a450d9aabab02a1a577a922cf6 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 14 Jun 2012 15:46:41 +0000 Subject: [PATCH] Minor correction to the previous integration: take into account current value of VTK_AUTOLOAD_PATH env variable --- bin/gui_setenv.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.39.2