<commit_before>mypath=$HOME
whereibelong=$(pwd)
cpucount=$(sysctl -n hw.ncpu)
echo "This device has $cpucount CPUs for compiling..."

#echo "Brew installing xz..."
#brew install xz > /dev/null

#brew upgrade

brew install coreutils
brew install bash

# prefer standard GNU tools like date over MacOS defaults
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$(brew --prefix)/opt/gnu-tar/libexec/gnubin:$PATH"

date --version
gdate --version
bash --version

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
echo "installing Python $BUILD_PYTHON_VERSION..."
sudo installer -pkg ./python-$BUILD_PYTHON_VERSION-macosx10.9.pkg -target /

# This fixes https://github.com/pyinstaller/pyinstaller/issues/5062
codesign --remove-signature /Library/Frameworks/Python.framework/Versions/3.9/Python

#if [ ! -f python-$MIN_PYTHON_VERSION-macosx10.9.pkg ]; then
#  wget --quiet https://www.python.org/ftp/python/$MIN_PYTHON_VERSION/python-$MIN_PYTHON_VERSION-macosx10.9.pkg
#fi
#sudo installer -pkg python-$MIN_PYTHON_VERSION-macosx10.9.pkg -target /

#brew install openssl@1.1
#brew upgrade python

#export python=python3
#export pip=pip3

#echo "Python location:"
#which $python<commit_msg>Use universal2 Python on Big Sur<commit_after>mypath=$HOME
whereibelong=$(pwd)
cpucount=$(sysctl -n hw.ncpu)
echo "This device has $cpucount CPUs for compiling..."

#echo "Brew installing xz..."
#brew install xz > /dev/null

#brew upgrade

brew install coreutils
brew install bash

# prefer standard GNU tools like date over MacOS defaults
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$(brew --prefix)/opt/gnu-tar/libexec/gnubin:$PATH"

date --version
gdate --version
bash --version

cd ~

# Use official Python.org version of Python which is backwards compatible
# with older MacOS versions
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 ./$pyfile -target /

# This fixes https://github.com/pyinstaller/pyinstaller/issues/5062
codesign --remove-signature /Library/Frameworks/Python.framework/Versions/3.9/Python

#if [ ! -f python-$MIN_PYTHON_VERSION-macosx10.9.pkg ]; then
#  wget --quiet https://www.python.org/ftp/python/$MIN_PYTHON_VERSION/python-$MIN_PYTHON_VERSION-macosx10.9.pkg
#fi
#sudo installer -pkg python-$MIN_PYTHON_VERSION-macosx10.9.pkg -target /

#brew install openssl@1.1
#brew upgrade python

#export python=python3
#export pip=pip3

#echo "Python location:"
#which $python
{'fraction_non_alphanumeric': 0.12553495007132667, 'fraction_numerical': 0.019614835948644792, 'mean_word_length': 4.795454545454546, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5922454', 'n_tokens_mistral': 1015, 'n_tokens_neox': 954, 'n_words': 228}