Skip to content
Roger Binns edited this page May 30, 2024 · 5 revisions

To make a local dev environment after checking out the source

# Ensure you are on the sqlite3mc branch
git switch sqlite3mc

# do this once
python3 -m venv .venv

# do this once if you use vscode / language server
make langserver

# this updates the current shell to pick up tools from the .venv directory
. .venv/bin/activate

# this updates the development packages - run once, and then weekly
make dev-depends

# to build.  You can also add --debug on the end which will turn on all assertions
# and provide debug flags to the compiler and linker
python3 setup.py build_ext --inplace --force --enable-all-extensions

@ to customize build
env CC=clang CFLAGS="-Og -DTHIS=THAT" LDFLAGS="-flto" python3 setup.py build_ext --inplace --force --enable-all-extensions

# to run all tests
python3 -m apsw.tests

# to run just our tests
python3 -m apsw.mctests

# you can get a CLI shell (with several extra useful commands).  uri params
# are enabled like with the sqlite3 cli
python3 -m apsw name.db

# To run gdb, invoke like this and set a breakpoint before starting the program
$ gdb --args python3 issue.py
(gdb) b mcIoFetch
Function "mcIoFetch" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
(gdb) run
Clone this wiki locally