This guide helps you get started with hammocking on Linux.
- Python 3.10 or higher (3.13 recommended)
- Git
- clang/llvm
- ninja-build
# Install Python 3.13
sudo apt update
sudo apt install python3.13 python3.13-venv python3-pip
# Optional: Install build tools for integration tests
sudo apt install clang ninja-build llvm# Clone the repository
git clone https://github.com/avengineers/hammocking
cd hammocking
# Install dependencies
./build.sh --install
# Run full build (includes lint, test, docs)
./build.shThe common tasks are separated as functions within ./build.sh.
# Complete setup with pre-commit hooks
./build.sh --setup
# Or manually
poetry install
poetry run pre-commit installRun ./build.sh --help to see all available targets.
If poetry command is not found after installation:
export PATH="$HOME/.local/bin:$PATH"Add this to your ~/.bashrc or ~/.zshrc to make it permanent.
Check your Python version:
python3 --versionIf you need to use a specific Python version with poetry:
poetry env use python3.13If integration tests fail due to missing clang:
# Skip integration tests
poetry run pytest -v -m "not integration"
# Or install clang
sudo apt install clangIf you see "poetry.lock changed" errors:
poetry lock
poetry install- Documentation: Built docs at
out/docs/html/index.htmlafter running./build.sh - Issues: https://github.com/avengineers/hammocking/issues
- Main command help:
poetry run python -m hammocking --help
- Read the full documentation:
./build.sh && firefox out/docs/html/index.html - Explore the examples in
docs/usage/examples/ - Check out the test files in
tests/to see how to use the API