changed 3 years ago
Linked with GitHub

Setup a macmini for PyPy

Initial setup

  • Install macos monterey 12.4
  • enable sharing:
    • system preferences -> sharing
    • enable screen, file, and remote (ssh)
  • Find terminal and pin it to the docker
    • launchpad -> terminal, once it opens pin the icon
  • Install xcode 13.4
  • Install rosetta softwareupdate --install-rosetta, ignore the message about "missing installKBytes attribute"
  • Install homebrew. Make sure it is the arm64 version, not the x86_64 one: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Look at this stack overflow about installing x86_64 homebrew and mark it for TODO, and forget I ever saw it

Now set up a PyPy dev environment

Use brew/pyenv to setup CPython2.7.18, hg,

% brew install pyenv, mercurial
% echo 'eval "$(pyenv init --path)"' >> ~/.zprofile
% pyenv install 2.7.18
# This must be done on every login
% pyenv global 2.7.18
% python -m pip install pycparser
% hg clone https://foss.heptapod.net/pypy/pypy pypy
% cd pypy
# Sidestep problems with 2.7.18 ctypes to bootstrap translation
% python rpython/bin/rpython -Ojit pypy/goal/targetpypystandalone.py --translationmodules
Select a repo