MacOS
brew install openssl xz zlib gdbm sqlite
Ubuntu
sudo apt install build-essential
sudo apt install libssl-dev zlib1g-dev libncurses5-dev\\ libncursesw5-dev libreadline-dev libsqlite3-dev libgdbm-dev\\ libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev libffi-dev
The flag --with-pydebug enables debug hooks
MacOS
CPPFLAGS="-I$(brew --prefix zlib)/include"\\ LDFLAGS="-L$(brew --prefix zlib)/lib"\\ ./configure --with-openssl=$(brew --prefix openssl) --with-pydebug
Ubuntu
./configure --with-pydebug
After running the command, Makefile is generated in the root of the repository
make -j2 -s
a binary is generated after building