| # Copyright 2022 Google LLC |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| EMSDK_ROOT = os.path.join('third_party', 'externals', 'emsdk') |
| EMSDK_PATH = os.path.join(EMSDK_ROOT, 'emsdk.py') |
| subprocess.check_call([sys.executable, EMSDK_PATH, 'install', EMSDK_VERSION]) |
| except subprocess.CalledProcessError: |
| print ('Failed to install emsdk') |
| subprocess.check_call([sys.executable, EMSDK_PATH, 'activate', EMSDK_VERSION]) |
| except subprocess.CalledProcessError: |
| print ('Failed to activate emsdk') |
| if __name__ == '__main__': |