This is a bit of a hack but I can't think of another way to do it.
Basically when downloading SDKs, we first try the new `.xz` extension.
If that fails, we fall back to the old `.tbz2`. Both these first two
download attempts we run in "silent" mode. If both of them fail we
re-run the original request in non-silent mode so that the error message
will always contain the original `.xz` extension.
See #1235
This script is (IMO) more readable, but the real reason for this change is that
it raises an error message when the binary package fails to download. (The shell
script silently generated a bogus hash instead, because the shell's `set -e`
builtin does not affect commands executing inside a $() context.
It seemed just as easy to rewrite the script in Python as to fix that.
This change also updates some outdated filename references.
Flake8's INI config file format requires commas after each line. Because our file didn't have them, the exclude list
wasn't set up correctly, and the --extend-exclude flag wasn't working. This PR fixes the .flake8 file.
Also, update flake8 to the latest version available (because version 3.8 is required to get the --extend-exclude flag)
and use the flag to exclude the files in the scripts/ directory from the python2 linter (since the scripts are python3).
The first time around `node` was being correctly added to the PATH, but
the second time around this code was observing the emsdk copy of node
in the PATH and assuming it could be skipped.
Fixes: #1240
* Add linux/arm64 support to bazel rules
* Make linux arm64 sha optional and PR feedback
Not all releases have linux shas. Use getattr to default to no sha if none was
present. This way non linux arm64 builds should not fail.
* Update linux arm64 sha for 3.1.33
This is the latest arm64 release according to #1204. There do not seem to be a any releases between .21 and .33.
If the user already has a version of node in their PATH don't clobber
it. This doesn't effect emscripten since the version of node we use
there is controlled via the config file, not via PATH.
Part of fix for #705.
- Remove reference to `~/.emscripten`. We no longer use the home
directory to store config information by default, either in
emscripten or in emsdk.
- Remove some references to `The Emscripten Command Prompt`. While I
suppose this is referring to the windows-only `emcmdprompt.bat`, and I
suppose it means "any shell where `activate` has been run", I think
its more clear to simply avoid using the term.
We have an existing `version_key` helper function for sorting versions.
It also does a better job, producing output like:
```
All recent (non-legacy) installable versions are:
3.1.31
3.1.31-asserts
3.1.30
3.1.30-asserts
3.1.29
3.1.29-asserts
```
Rather than:
```
All recent (non-legacy) installable versions are:
3.1.31
3.1.30
3.1.29
3.1.28
3.1.27
```
(with -assert versions listed after 3.1.0)