summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2019-01-14 16:51:34 (GMT)
committerMats Wichmann <mats@linux.com>2019-01-19 18:05:18 (GMT)
commite3a4ea4876d55d22a5a6f5e1f702e6dae11ee147 (patch)
tree25c5ff64c31131a5decd33624ab49128c96dba5a /src/script
parentca839c45d07493a4af03fd0ada016e837bd057dc (diff)
downloadSCons-e3a4ea4876d55d22a5a6f5e1f702e6dae11ee147.zip
SCons-e3a4ea4876d55d22a5a6f5e1f702e6dae11ee147.tar.gz
SCons-e3a4ea4876d55d22a5a6f5e1f702e6dae11ee147.tar.bz2
scons-local version has symlink problems
Earlier fix to running with scons-local when the directory is a symlink (i.e. scons-local symlinked to scons-local-{versiontag} and invoked as scons-local/scons.py) broke running scons when the "executable" is a symlink. Restoring that behavior. This is dodgy to test reliably on a developer system, as the fallback mechansim to find a usable scons goes on to look for a system-installed scons, so it looked like it was working. I will add a test if I can figure out a good way. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'src/script')
-rwxr-xr-xsrc/script/scons.py2
-rw-r--r--src/script/sconsign.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/script/scons.py b/src/script/scons.py
index d22e76b..351fb9f 100755
--- a/src/script/scons.py
+++ b/src/script/scons.py
@@ -68,7 +68,7 @@ Python 2.7 or >= 3.5 is required.\n"
# Strip the script directory from sys.path so on case-insensitive
# (WIN32) systems Python doesn't think that the "scons" script is the
# "SCons" package.
-script_dir = os.path.dirname(__file__)
+script_dir = os.path.dirname(os.path.realpath(__file__))
script_path = os.path.realpath(os.path.dirname(__file__))
if script_path in sys.path:
sys.path.remove(script_path)
diff --git a/src/script/sconsign.py b/src/script/sconsign.py
index 6241ae2..d15cff1 100644
--- a/src/script/sconsign.py
+++ b/src/script/sconsign.py
@@ -59,7 +59,7 @@ Python 2.7 or >= 3.5 is required.\n"
# Strip the script directory from sys.path so on case-insensitive
# (WIN32) systems Python doesn't think that the "scons" script is the
# "SCons" package.
-script_dir = os.path.dirname(__file__)
+script_dir = os.path.dirname(os.path.realpath(__file__))
script_path = os.path.realpath(os.path.dirname(__file__))
if script_path in sys.path:
sys.path.remove(script_path)