diff options
Diffstat (limited to 'src/script/scons.py')
-rw-r--r-- | src/script/scons.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/script/scons.py b/src/script/scons.py index 86d2562..cd8b432 100644 --- a/src/script/scons.py +++ b/src/script/scons.py @@ -184,7 +184,15 @@ sys.path = libs + sys.path ############################################################################## if __name__ == "__main__": - import SCons.Script + try: + import SCons.Script + except: + ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', 'engine') + if os.path.exists(ROOT): + sys.path += [ROOT] + print("SCons import failed. Trying to run from source directory") + import SCons.Script + # this does all the work, and calls sys.exit # with the proper exit status when done. SCons.Script.main() |