8
8
9
9
# First look for python bundled in Emsdk
10
10
if [ -z " $EMSDK_PYTHON " ]; then
11
- PYTHON3=$( dirname $0 ) /python/3.9.2-1_64bit/bin/python3
12
- PYTHON3_CERT_FILE=$( dirname $0 ) /python/3.9.2-1_64bit/lib/python3.9/site-packages/certifi/cacert.pem
13
- if [ ! -f $PYTHON3 ]; then
14
- PYTHON3=$( dirname $0 ) /python/3.7.4-2_64bit/bin/python3
15
- PYTHON3_CERT_FILE=$( dirname $0 ) /python/3.7.4-2_64bit/lib/python3.7/site-packages/certifi/cacert.pem
11
+ PYTHON3=" $( dirname " $0 " ) /python/3.9.2-1_64bit/bin/python3"
12
+ PYTHON3_CERT_FILE=" $( dirname " $0 " ) /python/3.9.2-1_64bit/lib/python3.9/site-packages/certifi/cacert.pem"
13
+ if [ ! -f " $PYTHON3 " ]; then
14
+ PYTHON3=" $( dirname " $0 " ) /python/3.7.4-2_64bit/bin/python3"
15
+ PYTHON3_CERT_FILE=" $( dirname " $0 " ) /python/3.7.4-2_64bit/lib/python3.7/site-packages/certifi/cacert.pem"
16
16
fi
17
- if [ -f $PYTHON3 ]; then
18
- EMSDK_PYTHON=$PYTHON3
17
+ if [ -f " $PYTHON3 " ]; then
18
+ EMSDK_PYTHON=" $PYTHON3 "
19
19
20
20
# When using our bundled python we never want the users
21
21
# PYTHONHOME or PYTHONPATH
@@ -26,15 +26,14 @@ if [ -z "$EMSDK_PYTHON" ]; then
26
26
# This is needed for MacOS. Without this, the urlopen
27
27
# code will try to use /usr/local/etc/openssl/cert.pem
28
28
# which may or may not exist on the system.
29
- export SSL_CERT_FILE=$PYTHON3_CERT_FILE
29
+ export SSL_CERT_FILE=" $PYTHON3_CERT_FILE "
30
30
fi
31
31
fi
32
32
33
33
# If bundled python is not found, look for `python3` in PATH. This is especially important on macOS (See:
34
34
# https://github.com/emscripten-core/emsdk/pull/273)
35
35
if [ -z " $EMSDK_PYTHON " ]; then
36
- PYTHON3=$( which python3 2> /dev/null)
37
- if [ $? = 0 ]; then
36
+ if PYTHON3=" $( which python3 2> /dev/null) " ; then
38
37
EMSDK_PYTHON=$PYTHON3
39
38
fi
40
39
fi
0 commit comments