2 |
|
|
3 |
import os.path, sys, platform |
import os.path, sys, platform |
4 |
|
|
|
LD_LIBRARY_PATH = os.environ.get('LD_LIBRARY_PATH').split(":") |
|
5 |
restart = 0 |
restart = 0 |
6 |
|
|
7 |
# this script handles restarting ascend if it's invoked without the full |
# this script handles restarting ascend if it's invoked without the full |
12 |
else: |
else: |
13 |
SEP=":" |
SEP=":" |
14 |
|
|
15 |
|
if os.environ.get('LD_LIBRARY_PATH'): |
16 |
|
LD_LIBRARY_PATH = os.environ.get('LD_LIBRARY_PATH').split(SEP) |
17 |
|
else: |
18 |
|
#LD_LIBRARY_PATH = ['/usr/local/lib'] |
19 |
|
LD_LIBRARY_PATH = [] |
20 |
|
|
21 |
if not os.environ.get('ASC_GDB'): |
if not os.environ.get('ASC_GDB'): |
22 |
# restarting messes up GDB so don't allow it |
# restarting messes up GDB so don't allow it |
23 |
if "@INSTALL_LIB@"!="/usr/lib": |
if "@INSTALL_LIB@"!="/usr/lib": |
24 |
|
|
25 |
if not "@INSTALL_LIB@" in LD_LIBRARY_PATH: |
if not "@INSTALL_LIB@" in LD_LIBRARY_PATH: |
26 |
LD_LIBRARY_PATH = ["@INSTALL_LIB@"] + LD_LIBRARY_PATH |
LD_LIBRARY_PATH = ["@INSTALL_LIB@"] + LD_LIBRARY_PATH |
27 |
os.environ['LD_LIBRARY_PATH'] = SEP.join(LD_LIBRARY_PATH) |
os.environ['LD_LIBRARY_PATH'] = SEP.join(LD_LIBRARY_PATH) |