Use universal2 Python on Big Sur

This commit is contained in:
Jay Lee
2021-01-03 19:10:55 -05:00
committed by GitHub
parent 4155e2bb64
commit aa33dc83d4

View File

@@ -22,9 +22,15 @@ cd ~
# Use official Python.org version of Python which is backwards compatible
# with older MacOS versions
wget https://www.python.org/ftp/python/$BUILD_PYTHON_VERSION/python-$BUILD_PYTHON_VERSION-macosx10.9.pkg
if [ "$PLATFORM" == "x86_64" ]; then
export pyfile=python-$BUILD_PYTHON_VERSION-macosx10.9.pkg
else
export pyfile=python-$BUILD_PYTHON_VERSION-macos11.0.pkg
fi
wget https://www.python.org/ftp/python/$BUILD_PYTHON_VERSION/$pyfile
echo "installing Python $BUILD_PYTHON_VERSION..."
sudo installer -pkg ./python-$BUILD_PYTHON_VERSION-macosx10.9.pkg -target /
sudo installer -pkg ./$pyfile -target /
# This fixes https://github.com/pyinstaller/pyinstaller/issues/5062
codesign --remove-signature /Library/Frameworks/Python.framework/Versions/3.9/Python