deb-mock/Makefile
robojerk 45c124637b
Some checks failed
Comprehensive CI/CD Pipeline / Build and Test (push) Failing after 2m1s
Comprehensive CI/CD Pipeline / Security Audit (push) Successful in 46s
Comprehensive CI/CD Pipeline / Package Validation (push) Successful in 1m7s
Comprehensive CI/CD Pipeline / Status Report (push) Has been skipped
builds, initial testing builds, packaging, ci workflow
2025-09-04 12:55:35 -07:00

91 lines
No EOL
2.2 KiB
Makefile

# deb-mock Makefile
# Debian's equivalent to Fedora's Mock build environment manager
.PHONY: all install clean test lint format dev-setup help
# Default target
all: install
# Install the package
install:
@echo "Installing deb-mock..."
@python3 setup.py build
# Install development dependencies
dev-setup: install
@echo "Installing development dependencies..."
@pip install -e ".[dev]"
# Run tests
test:
@echo "Running tests..."
@python -m pytest tests/ -v
# Run tests with coverage
test-cov:
@echo "Running tests with coverage..."
@python -m pytest tests/ --cov=deb_mock --cov-report=html
# Lint the code
lint:
@echo "Linting code..."
@flake8 deb_mock/ tests/
@mypy deb_mock/
# Format the code
format:
@echo "Formatting code..."
@black deb_mock/ tests/
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
@rm -rf build/
@rm -rf dist/
@rm -rf *.egg-info/
@rm -rf .pytest_cache/
@rm -rf htmlcov/
@find . -type f -name "*.pyc" -delete
@find . -type d -name "__pycache__" -delete
# Development helpers
dev-install: dev-setup
@echo "Development environment ready!"
dev-test: dev-setup test
dev-lint: dev-setup lint
dev-format: dev-setup format
# Run the CLI
run:
@echo "Running deb-mock CLI..."
@python -m deb_mock.cli --help
# Create virtual environment (optional)
venv:
@echo "Creating virtual environment..."
@python3 -m venv venv
@echo "Virtual environment created. Activate with: source venv/bin/activate"
# Help
help:
@echo "deb-mock Makefile"
@echo ""
@echo "Targets:"
@echo " all - Install the package"
@echo " install - Install the package"
@echo " dev-setup - Install with development dependencies"
@echo " test - Run tests"
@echo " test-cov - Run tests with coverage"
@echo " lint - Lint the code"
@echo " format - Format the code"
@echo " clean - Clean build artifacts"
@echo " dev-install - Set up development environment"
@echo " dev-test - Run tests in development environment"
@echo " dev-lint - Lint code in development environment"
@echo " dev-format - Format code in development environment"
@echo " run - Run the CLI"
@echo " venv - Create virtual environment"
@echo " help - Show this help"