From aa33dc83d4f6b49f744c0efae64f743970baadd5 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Sun, 3 Jan 2021 19:10:55 -0500 Subject: [PATCH] Use universal2 Python on Big Sur --- .github/actions/macos-before-install.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/macos-before-install.sh b/.github/actions/macos-before-install.sh index 288ada06..0dabde6a 100755 --- a/.github/actions/macos-before-install.sh +++ b/.github/actions/macos-before-install.sh @@ -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