Skip to content

Commit

Permalink
Ensure emscripten root is at the start of python path (emscripten-cor…
Browse files Browse the repository at this point in the history
…e#22230)

This avoids issues where something called e.g. `tools` already exists in
the python path.

See
emscripten-core/emsdk#1420 (comment)
  • Loading branch information
sbc100 authored and verhovsky committed Jul 30, 2024
1 parent a6aecf1 commit f6d6f5b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/benchmark/benchmark_sse.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from subprocess import Popen

__rootpath__ = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(__rootpath__)
sys.path.insert(0, __rootpath__)

from tools.shared import WINDOWS, CLANG_CXX, EMCC, PIPE
from tools.shared import run_process
Expand Down
2 changes: 1 addition & 1 deletion test/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# Setup

__rootpath__ = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(__rootpath__)
sys.path.insert(0, __rootpath__)

import jsrun
import parallel_testsuite
Expand Down
2 changes: 1 addition & 1 deletion tools/maint/check_struct_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
script_dir = os.path.dirname(os.path.abspath(__file__))
root_dir = os.path.dirname(os.path.dirname(script_dir))

sys.path.append(root_dir)
sys.path.insert(0, root_dir)

from tools import utils

Expand Down
2 changes: 1 addition & 1 deletion tools/maint/create_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
script_dir = os.path.dirname(os.path.abspath(__file__))
root_dir = os.path.dirname(os.path.dirname(script_dir))

sys.path.append(root_dir)
sys.path.insert(0, root_dir)
from tools import shared, utils


Expand Down
2 changes: 1 addition & 1 deletion tools/maint/update_settings_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
script_dir = os.path.dirname(os.path.abspath(__file__))
root_dir = os.path.dirname(os.path.dirname(script_dir))

sys.path.append(root_dir)
sys.path.insert(0, root_dir)

from tools.utils import path_from_root, read_file, safe_ensure_dirs

Expand Down

0 comments on commit f6d6f5b

Please sign in to comment.