From 6b6c51f010a032f5f7a7978845dd333d31b98ebf Mon Sep 17 00:00:00 2001 From: Christian Sandberg Date: Wed, 20 Sep 2017 15:27:29 +0200 Subject: Fix usage on embedded Python First entry in sys.path is not always the script directory. --- src/script/scons.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/scons.py b/src/script/scons.py index bdf0cea..f2a44f8 100644 --- a/src/script/scons.py +++ b/src/script/scons.py @@ -65,7 +65,7 @@ Python < 3.5 is not yet supported.\n" sys.exit(1) -script_dir = sys.path[0] +script_dir = os.path.dirname(os.path.realpath(__file__)) if script_dir in sys.path: sys.path.remove(script_dir) -- cgit v0.12