X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fenvironment.py;h=20a5c1eb95dc0b4f6a58873ffa657305a57909d0;hb=cf8129d30d2a819ccee42e611c9f80d5e0aad5b8;hp=41ec7e5394d75b5d3fa63457664c5567cf22bb95;hpb=ce68e3720e82c8a9d9ec6a0f581db64932bff87e;p=tools%2Fsat.git diff --git a/src/environment.py b/src/environment.py index 41ec7e5..20a5c1e 100644 --- a/src/environment.py +++ b/src/environment.py @@ -73,9 +73,11 @@ class Environ: :param value str: the value to append to key :param sep str: the separator string """ - for c in [";", ":"]: # windows or linux path separators - if c in value: - raise Exception("Environ append key '%s' value '%s' contains forbidden character '%s'" % (key, value, c)) + # check that value so no contain the system separator + separator=os.pathsep + if separator in value: + raise Exception("Environ append key '%s' value '%s' contains forbidden character '%s'" % (key, value, separator)) + # check if the key is already in the environment if key in self.environ: value_list = self.environ[key].split(sep) @@ -111,9 +113,11 @@ class Environ: :param value str: the value to prepend to key :param sep str: the separator string """ - for c in [";", ":"]: # windows or linux path separators - if c in value: - raise Exception("Environ prepend key '%s' value '%s' contains forbidden character '%s'" % (key, value, c)) + # check that value so no contain the system separator + separator=os.pathsep + if separator in value: + raise Exception("Environ append key '%s' value '%s' contains forbidden character '%s'" % (key, value, separator)) + # check if the key is already in the environment if key in self.environ: value_list = self.environ[key].split(sep) @@ -499,11 +503,11 @@ class SalomeEnviron: self.prepend('LD_LIBRARY_PATH', lib_path) l = [ bin_path, lib_path ] - if self.has_python: - l.append(pylib1_path) - l.append(pylib2_path) - - self.prepend('PYTHONPATH', l) + if not src.product.product_is_wheel(pi): + if self.has_python: + l.append(pylib1_path) + l.append(pylib2_path) + self.prepend('PYTHONPATH', l) def set_cpp_env(self, product_info): """\