macos-setup.sh: fix Python 3 installation for OS X 10.8 and older
Change-Id: I3c5b7fa272fbef770b06430edadb8abfc688e951 Fixes: v2.9.0rc0-2460-ge9f7bb5127 ("Require Python 3, drop Python 2 support") Reviewed-on: https://code.wireshark.org/review/30548 Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
This commit is contained in:
parent
7f2cf2fcca
commit
e5cd755578
|
@ -1702,11 +1702,17 @@ uninstall_json_glib() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_python3() {
|
install_python3() {
|
||||||
|
local macver=10.9
|
||||||
|
if [[ $DARWIN_MAJOR_VERSION -lt 13 ]]; then
|
||||||
|
# The 64-bit installer requires 10.9 (Mavericks), use the 64-bit/32-bit
|
||||||
|
# variant for 10.6 (Snow Leopard) and newer.
|
||||||
|
macver=10.6
|
||||||
|
fi
|
||||||
if [ "$PYTHON3_VERSION" -a ! -f python3-$PYTHON3_VERSION-done ] ; then
|
if [ "$PYTHON3_VERSION" -a ! -f python3-$PYTHON3_VERSION-done ] ; then
|
||||||
echo "Downloading and installing python3:"
|
echo "Downloading and installing python3:"
|
||||||
[ -f python-$PYTHON3_VERSION-macosx10.9.pkg ] || curl -L -O https://www.python.org/ftp/python/$PYTHON3_VERSION/python-$PYTHON3_VERSION-macosx10.9.pkg || exit 1
|
[ -f python-$PYTHON3_VERSION-macosx$macver.pkg ] || curl -L -O https://www.python.org/ftp/python/$PYTHON3_VERSION/python-$PYTHON3_VERSION-macosx$macver.pkg || exit 1
|
||||||
$no_build && echo "Skipping installation" && return
|
$no_build && echo "Skipping installation" && return
|
||||||
sudo installer -target / -pkg python-$PYTHON3_VERSION-macosx10.9.pkg || exit 1
|
sudo installer -target / -pkg python-$PYTHON3_VERSION-macosx$macver.pkg || exit 1
|
||||||
touch python3-$PYTHON3_VERSION-done
|
touch python3-$PYTHON3_VERSION-done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -1738,6 +1744,7 @@ uninstall_python3() {
|
||||||
# Get rid of the previously downloaded and unpacked version.
|
# Get rid of the previously downloaded and unpacked version.
|
||||||
#
|
#
|
||||||
rm -f python-$installed_python3_version-macosx10.9.pkg
|
rm -f python-$installed_python3_version-macosx10.9.pkg
|
||||||
|
rm -f python-$installed_python3_version-macosx10.6.pkg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
installed_python3_version=""
|
installed_python3_version=""
|
||||||
|
|
Loading…
Reference in New Issue