-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (45 loc) · 1.78 KB
/
Makefile
File metadata and controls
60 lines (45 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.PHONY: install dev build-deps test lint format build clean run run-devmode help venv lock
VENV_DIR ?= .venv
UV ?= uv
help:
@echo "ShellGame - Makefile commands:"
@echo " make install - Install package (base deps) via uv"
@echo " make dev - Install package with dev deps via uv"
@echo " make lock - Generate/update uv.lock"
@echo " make test - Run tests with coverage (uv run)"
@echo " make lint - Run type checking with mypy (uv run)"
@echo " make format - Format code with black (uv run)"
@echo " make build - Build standalone binary with PyInstaller (installs build-only deps)"
@echo " make clean - Clean build artifacts and cache"
@echo " make run - Run ShellGame (normal mode; auto-launches wrapped subshell if needed)"
@echo " make run-devmode - Run ShellGame with --devmode (auto-launches wrapped subshell if needed)"
$(VENV_DIR):
$(UV) venv $(VENV_DIR) --quiet
venv: | $(VENV_DIR)
install: venv
$(UV) sync
dev: venv
$(UV) sync --extra dev
build-deps: venv
$(UV) sync --extra build
lock:
$(UV) lock
test: dev
$(UV) run pytest tests/ -v --cov=shellgame --cov-report=term-missing
lint: dev
$(UV) run ruff check src/shellgame/ tests/
$(UV) run mypy src/shellgame/
format: dev
$(UV) run ruff format src/shellgame/ tests/
build: build-deps
$(UV) run pyinstaller shellgame.spec
clean:
rm -rf build/ dist/ *.egg-info .pytest_cache .mypy_cache .coverage
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete
run: dev
# Normal run (no devmode). This will still auto-launch the wrapped subshell if needed.
$(UV) run shellgame
run-devmode: dev
# Dev mode. This will still auto-launch the wrapped subshell if needed.
$(UV) run shellgame --devmode