#!/usr/bin/env bash set -euo pipefail # Ensure Python imports from our source tree # Guard against unbound PYTHONPATH when running with 'set -u'. # If PYTHONPATH is already set, prepend our src directory; otherwise just use src. export PYTHONPATH="${PWD}/src:${PYTHONPATH:-}" echo "Running Python tests..." echo "Installing package dependencies..." python3 -m pip install --upgrade pip setuptools wheel >/dev/null 2>&1 || true python3 -m pip install -e . >/dev/null 2>&1 || true pytest -q echo "Building package (verification step)…" python3 -m build echo "All tests passed and package built."