def setup_emscripten():
    if ('EMSCRIPTEN' in os.environ):
        return
    local_root = get_emscripten_root()
    os.environ['EMSCRIPTEN'] = local_root
    os.environ['EM_CONFIG'] = os.path.join(os.path.dirname(local_root), '.emscripten')
    try:
        find_in_path('node')
    except error.Error:
        node_bin = os.path.join(paths.OUT_DIR, 'node', 'bin')
        if (not os.path.isdir(node_bin)):
            raise error.Error(('node not found in path and default path not found: %s' % node_bin))
        os.environ['PATH'] += (':' + node_bin)
        find_in_path('node')
def setup_emscripten():
    if ('EMSCRIPTEN' in os.environ):
        return
    local_root = get_emscripten_root()
    os.environ['EMSCRIPTEN'] = local_root
    os.environ['EM_CONFIG'] = os.path.join(os.path.dirname(local_root), '.emscripten')
    try:
        find_in_path('node')
    except error.Error:
        node_bin = os.path.join(paths.OUT_DIR, 'node', 'bin')
        if (not os.path.isdir(node_bin)):
            raise error.Error(('node not found in path and default path not found: %s' % node_bin))
        os.environ['PATH'] += (':' + node_bin)
        find_in_path('node')