Skip to content

Instantly share code, notes, and snippets.

@i-v-s
Created December 3, 2023 14:31
Show Gist options
  • Save i-v-s/a1b554b8c5e925f3955eeb2b537ee0a3 to your computer and use it in GitHub Desktop.
Save i-v-s/a1b554b8c5e925f3955eeb2b537ee0a3 to your computer and use it in GitHub Desktop.
Build local Python with any SQLite
export CC=/usr/bin/gcc-13 # Or any other C compiler
export CXX=/usr/bin/g++-13
export LOCAL_PRE={local dir}
export CFLAGS="-I${LOCAL_PRE}/include $CFLAGS"
# In the SQLite source folder:
./configure --prefix=${LOCAL_PRE}
make -j 4
make install
# In the Python source folder
export CFLAGS="-I${LOCAL_PRE}/include $CFLAGS"
export LDFLAGS="-L${LOCAL_PRE}/lib $LDFLAGS"
export LD_LIBRARY_PATH=${LOCAL_PRE}/lib:$LD_LIBRARY_PATH # Must be set at every invocation of Python.
./configure --enable-optimizations --prefix=${LOCAL_PRE}
make -j 4
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment