Skip to content

Instantly share code, notes, and snippets.

@thewisenerd
Created September 14, 2022 23:28
Show Gist options
  • Save thewisenerd/e1de359dcd642515f0c6d229ca98ed5c to your computer and use it in GitHub Desktop.
Save thewisenerd/e1de359dcd642515f0c6d229ca98ed5c to your computer and use it in GitHub Desktop.
macOS python compilation with enable-loadable-sqlite-extensions
# kangeth homebrew somewhat: https://github.com/Homebrew/homebrew-core/blob/b5cb06cdea07ccb18fdf4a186148cfd3db23e874/Formula/sqlite.rb
env CPPFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_MAX_VARIABLE_NUMBER=250000" \
./configure \
--prefix=$HOME/works/unix/binaries/sqlite \
--enable-dynamic-extensions \
--enable-readline \
--disable-editline \
--enable-session
make install
# ssl important or pip stops working
# --enable-loadable-sqlite-extensions is the important bit
env \
LDFLAGS="-L$HOME/works/unix/binaries/sqlite/lib" \
CPPFLAGS="-I$HOME/works/unix/binaries/sqlite/include" \
./configure \
--prefix=$HOME/works/unix/binaries/python \
--with-openssl=$(brew --prefix openssl)
--enable-loadable-sqlite-extensions
env \
LDFLAGS="-L$HOME/works/unix/binaries/sqlite/lib" \
CPPFLAGS="-I$HOME/works/unix/binaries/sqlite/include" \
make install
@thewisenerd
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment