MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / normalize_relative_python_path

Function normalize_relative_python_path

tools/config.py:53–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52
53def normalize_relative_python_path():
54 # User may have specified the EMSDK_PYTHON environment variable to point to
55 # the Python interpreter, e.g.
56 #
57 # EMSDK_PYTHON=../../path/to/python emcc test/hello_world.c
58 #
59 # As part of its operation, emcc may spawn sub-emcc tasks when building
60 # libraries to cache. These sub-emcc tasks will run in a different CWD, so
61 # reinitialize EMSDK_PYTHON here so that sub-tool spawns will use the same
62 # Python interpreter as the parent.
63 if os.environ.get('EMSDK_PYTHON'):
64 os.environ['EMSDK_PYTHON'] = sys.executable
65
66
67def set_config_from_tool_location(config_key, tool_binary, f):

Callers 1

read_configFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected