Files
kumacli/Makefile
Pim van Pelt e2e65add2e Add tests
2025-08-02 20:03:32 +02:00

53 lines
1.4 KiB
Makefile

.PHONY: clean build install test test-deps help
# Default target
help:
@echo "Available targets:"
@echo " clean - Remove build artifacts and cache files"
@echo " build - Build the wheel package"
@echo " install - Install the package in development mode"
@echo " test - Run the test suite"
@echo " test-deps - Install test dependencies"
@echo " help - Show this help message"
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
rm -rf build/
rm -rf dist/
rm -rf src/kumacli.egg-info/
rm -rf src/kumacli/__pycache__/
rm -rf src/kumacli/cmd/__pycache__/
find . -name "*.pyc" -delete
find . -name "*.pyo" -delete
find . -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
@echo "Clean complete."
# Build the wheel package
build: clean
@echo "Building wheel package..."
python3 -m build
@echo "Build complete. Artifacts in dist/"
# Install package in development mode
install:
@echo "Installing package in development mode..."
pip install -e .
# Install test dependencies
test-deps:
@echo "Installing test dependencies..."
pip install -e ".[test]"
# Test the package
test:
@echo "Running tests..."
python3 run_tests.py
# Rebuild and reinstall (useful during development)
dev: clean build
@echo "Installing newly built package..."
pip uninstall kumacli -y 2>/dev/null || true
pip install dist/kumacli-*.whl
@echo "Development installation complete."