#! /usr/bin/env python
-# Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2015 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
def main(args):
# Identify application path then locate configuration files
- currentPath = os.path.dirname( os.path.abspath( __file__ ) )
+ currentPath = os.path.realpath(os.path.dirname(os.path.abspath(__file__)))
launcherFile = os.path.basename(__file__)
from salome_starter import initialize
initialize(currentPath, launcherFile)
#! /usr/bin/env python
-# Copyright (C) 2014 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2014, 2015 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
os.environ['APPLI'] = appliPath # needed to convert .sh environment files
os.environ['ABSOLUTE_APPLI_PATH'] = absoluteAppliPath
- sys.path[:0] = [os.path.join(absoluteAppliPath, "bin", "salome")]
+ sys.path[:0] = [os.path.realpath(os.path.join(absoluteAppliPath, "bin", "salome"))]
# define folder to store omniorb config (initially in virtual application folder)
try:
#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
import setenv
kernel_root=os.getenv("KERNEL_ROOT_DIR")
+kernel_root = os.path.realpath(kernel_root)
sys.path[:0]=[os.path.join(kernel_root,"bin","salome")]
argv = sys.argv[1:]
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
def execScript(script_path):
print 'executing', script_path
- sys.path.insert(0, os.path.dirname(script_path))
+ sys.path.insert(0, os.path.realpath(os.path.dirname(script_path)))
execfile(script_path,globals())
del sys.path[0]
-# Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2015 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
import os
absoluteAppliPath = os.getenv('ABSOLUTE_APPLI_PATH')
import sys
- path = os.path.join(absoluteAppliPath, "bin", "salome")
+ path = os.path.realpath(os.path.join(absoluteAppliPath, "bin", "salome"))
if not path in sys.path:
sys.path[:0] = [path]
except:
# set environment
for reserved in reservedDict:
a = filter(None, reservedDict[reserved]) # remove empty elements
+ a = [ os.path.realpath(x) for x in a ]
reformattedVals = os.pathsep.join(a)
self.addToVariable(reserved, reformattedVals)
pass
self.setVariable(key, val, overwrite=True)
pass
- sys.path[:0] = os.getenv('PYTHONPATH','').split(os.pathsep)
+ pythonpath = os.getenv('PYTHONPATH','').split(os.pathsep)
+ pythonpath = [ os.path.realpath(x) for x in pythonpath ]
+ sys.path[:0] = pythonpath
#
def _runAppli(self, args=None):
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
newpath = string.join(newpath, splitsym)
os.environ[variable_name] = newpath
if variable_name == "PYTHONPATH":
- sys.path[:0] = [directory]
+ sys.path[:0] = [os.path.realpath(directory)]
# -----------------------------------------------------------------------------