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

Function main

tools/install.py:103–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101
102
103def main():
104 parser = argparse.ArgumentParser(description=__doc__)
105 parser.add_argument('-v', '--verbose', action='store_true', help='verbose',
106 default=int(os.environ.get('EMCC_DEBUG', '0')))
107 parser.add_argument('target', help='target directory')
108 args = parser.parse_args()
109 target = os.path.abspath(args.target)
110 if os.path.exists(target):
111 print('target directory already exists: %s' % target)
112 return 1
113 logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO)
114 os.makedirs(target)
115 copy_emscripten(target)
116 npm_install(target)
117 if os.path.isdir('.git'):
118 # Add revision flag only if the source directory is a Git repository
119 # and not a source archive
120 add_revision_file(target)
121 return 0
122
123
124if __name__ == '__main__':

Callers 1

install.pyFile · 0.70

Calls 6

copy_emscriptenFunction · 0.85
npm_installFunction · 0.85
add_revision_fileFunction · 0.85
existsMethod · 0.80
printFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected