Skip to content

Commit 4e8dc6f

Browse files
authored
Ensure emscripten root is at the start of python path (#22230)
This avoids issues where something called e.g. `tools` already exists in the python path. See emscripten-core/emsdk#1420 (comment)
1 parent ec14ddf commit 4e8dc6f

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

test/benchmark/benchmark_sse.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from subprocess import Popen
1414

1515
__rootpath__ = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
16-
sys.path.append(__rootpath__)
16+
sys.path.insert(0, __rootpath__)
1717

1818
from tools.shared import WINDOWS, CLANG_CXX, EMCC, PIPE
1919
from tools.shared import run_process

test/runner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# Setup
3434

3535
__rootpath__ = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
36-
sys.path.append(__rootpath__)
36+
sys.path.insert(0, __rootpath__)
3737

3838
import jsrun
3939
import parallel_testsuite

tools/maint/check_struct_info.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
script_dir = os.path.dirname(os.path.abspath(__file__))
1212
root_dir = os.path.dirname(os.path.dirname(script_dir))
1313

14-
sys.path.append(root_dir)
14+
sys.path.insert(0, root_dir)
1515

1616
from tools import utils
1717

tools/maint/create_release.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
script_dir = os.path.dirname(os.path.abspath(__file__))
1313
root_dir = os.path.dirname(os.path.dirname(script_dir))
1414

15-
sys.path.append(root_dir)
15+
sys.path.insert(0, root_dir)
1616
from tools import shared, utils
1717

1818

tools/maint/update_settings_docs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
script_dir = os.path.dirname(os.path.abspath(__file__))
2424
root_dir = os.path.dirname(os.path.dirname(script_dir))
2525

26-
sys.path.append(root_dir)
26+
sys.path.insert(0, root_dir)
2727

2828
from tools.utils import path_from_root, read_file, safe_ensure_dirs
2929

0 commit comments

Comments
 (0)