Skip to content

Commit 062ae2a

Browse files
authored
Merge pull request #174 from thewtex/mac-python-3.10
2 parents 16d2c51 + c6265d8 commit 062ae2a

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

scripts/macpython-install-python.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ LATEST_3p6=3.6.8
5252
LATEST_3p7=3.7.9
5353
LATEST_3p8=3.8.10
5454
LATEST_3p9=3.9.5
55+
LATEST_3p10=3.10.0
5556

5657

5758
function check_python {
@@ -108,7 +109,9 @@ function fill_pyver {
108109
echo $ver
109110
elif [ $ver == 2 ] || [ $ver == "2.7" ]; then
110111
echo $LATEST_2p7
111-
elif [ $ver == 3 ] || [ $ver == "3.9" ]; then
112+
elif [ $ver == 3 ] || [ $ver == "3.10" ]; then
113+
echo $LATEST_3p10
114+
elif [ $ver == "3.9" ]; then
112115
echo $LATEST_3p9
113116
elif [ $ver == "3.8" ]; then
114117
echo $LATEST_3p8
@@ -196,7 +199,11 @@ function pyinst_fname_for_version {
196199
echo "python-${py_version}-macos11.${inst_ext}"
197200
fi
198201
else
199-
echo "python-${py_version}-macosx${py_osx_ver}.${inst_ext}"
202+
if [ "$py_version" == "3.10.0" ]; then
203+
echo "python-${py_version}-macos${py_osx_ver}.${inst_ext}"
204+
else
205+
echo "python-${py_version}-macosx${py_osx_ver}.${inst_ext}"
206+
fi
200207
fi
201208
}
202209

@@ -347,7 +354,7 @@ function install_mac_cpython {
347354
inst_path=/Volumes/Python/Python.mpkg
348355
fi
349356
sudo installer -pkg $inst_path -target /
350-
local py_mm=${py_version:0:3}
357+
local py_mm=${py_version%.*}
351358
PYTHON_EXE=$MACPYTHON_PY_PREFIX/$py_mm/bin/python$py_mm
352359
# Install certificates for Python 3.6
353360
local inst_cmd="/Applications/Python ${py_mm}/Install Certificates.command"
@@ -394,7 +401,7 @@ sudo rm -rf ${MACPYTHON_FRAMEWORK}
394401
if test "$(arch)" == "arm64"; then
395402
echo "we are arm"
396403
PLAT=arm64
397-
for pyversion in $LATEST_3p9; do
404+
for pyversion in $LATEST_3p9 $LATEST_3p10; do
398405
install_macpython $pyversion 11
399406
install_virtualenv
400407
done
@@ -403,4 +410,8 @@ else
403410
install_macpython $pyversion 10.9
404411
install_virtualenv
405412
done
413+
for pyversion in $LATEST_3p10; do
414+
install_macpython $pyversion 11
415+
install_virtualenv
416+
done
406417
fi

0 commit comments

Comments
 (0)