Skip to content

Commit

Permalink
Use universal2 Python on Big Sur
Browse files Browse the repository at this point in the history
  • Loading branch information
jay0lee authored Jan 4, 2021
1 parent 4155e2b commit aa33dc8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/actions/macos-before-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aa33dc8

Please sign in to comment.