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

Function get_required_path

emsdk.py:1579–1596  ·  view source on GitHub ↗
(active_tools)

Source from the content-addressed store, hash-verified

1577# Finds and returns a list of the directories that need to be added to PATH for
1578# the given set of tools.
1579def get_required_path(active_tools):
1580 path_add = [to_native_path(EMSDK_PATH)]
1581 for tool in active_tools:
1582 if tool.activated_path:
1583 path = to_native_path(tool.expand_vars(tool.activated_path))
1584 # If the tool has an activated_path_skip attribute then we don't add
1585 # the tools path to the users path if a program by that name is found
1586 # in the existing PATH. This allows us to, for example, add our version
1587 # node to the users PATH if, and only if, they don't already have a
1588 # another version of node in their PATH.
1589 if tool.activated_path_skip:
1590 current_path = shutil.which(tool.activated_path_skip)
1591 # We found an executable by this name in the current PATH, but we
1592 # ignore our own version for this purpose.
1593 if current_path and os.path.dirname(current_path) != path:
1594 continue
1595 path_add.append(path)
1596 return path_add
1597
1598
1599# Returns the absolute path to the file '.emscripten' for the current user on

Callers 3

locate_cmake_from_toolFunction · 0.85
generate_em_configFunction · 0.85
adjusted_pathFunction · 0.85

Calls 2

to_native_pathFunction · 0.85
expand_varsMethod · 0.80

Tested by

no test coverage detected