PYTHON ?= python3
PIP    ?= $(PYTHON) -m pip

.PHONY: install test build publish clean demo lint

install:
	$(PIP) install -e ".[dev]"

test:
	$(PYTHON) -m pytest -v

build:
	$(PYTHON) -m build

publish:
	twine upload dist/*

clean:
	rm -rf dist/ build/ *.egg-info/ shieldpkg.egg-info/
	find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
	find . -type f -name "*.pyc" -delete 2>/dev/null || true

demo:
	shieldpkg demo

lint:
	$(PYTHON) -m ruff check shieldpkg tests
