#!/usr/bin/env bash

# ensure consistent behaviour
src_dir="$(dirname "$(realpath "$0")")"
source $src_dir/utils/_env.sh

echo
echo --------------------------------------------------------------
echo Removing wheelhouse, ruff, mypy, pytest and other cached files
echo --------------------------------------------------------------
rm -vrf .coverage .mypy_cache .pytest_cache .ruff_cache .wheelhouse
echo
echo ------------------------------------------
echo Removing Meson build directories and files
echo ------------------------------------------
rm -vrf "$build_dir" "$build_dev_dir" "$KRES_DEV_INSTALL_DIR" build dist 
echo
echo ------------------------------------------
echo Removing __pycache__ directories and files
echo ------------------------------------------
find python -type d -name '__pycache__' -prune -exec rm -vrf {} +
find tests/python -type d -name '__pycache__' -prune -exec rm -vrf {} +
echo