DEV Community

Abhishek
Abhishek

Posted on

Mac OS Python build from source with optimizations and debugging

brew install openssl xz gdbm zlib
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib -L/opt/homebrew/lib -L/opt/homebrew/opt/sqlite3/lib -L/opt/homebrew/opt/zlib/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include -I/opt/homebrew/include -I/opt/homebrew/opt/sqlite3/include -I/opt/homebrew/opt/zlib/include"
export PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig:/opt/homebrew/opt/openssl@3/lib/pkgconfig:/opt/homebrew/opt/sqlite3/lib/pkgconfig"

#configure python source
./configure --enable-optimizations --with-pydebug --with-openssl=$(brew --prefix openssl)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.