-
Install Python:
sudo apt install -y python3 python3-pip python3-venv
-
Make a virtual environment (optional):
python3 -m venv .venv source .venv/bin/activate
-
Update pip:
pip install --upgrade pip
-
Install exampleproject:
pip install .
-
Install C++ build tools:
pip install --upgrade meson ninja
-
Configure the meson project (Debug mode):
Debug:
meson setup -Ddebug=true -Doptimization=g build/
Release:
meson setup -Ddebug=false -Doptimization=3 -Db_lto=true -Db_ndebug=true build/
-
Compile:
meson compile -C build/
-
Run tests:
meson test meson test --benchmark
-
Install editable-mode dependencies:
pip install --upgrade meson-python meson ninja
-
Install the package in editable mode with tests enabled:
pip uninstall -y exampleproject pip install --no-build-isolation --editable .[test]
-
Run tests:
pytest python/tests