-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (66 loc) · 2.62 KB
/
Copy pathMakefile
File metadata and controls
81 lines (66 loc) · 2.62 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
PYTHON ?= python3
PIP ?= $(PYTHON) -m pip
PACKAGE_MODULE := ai_cli_kit
CODEX_MODULE := ai_cli_kit.codex
CLAUDE_MODULE := ai_cli_kit.claude
# Force UTF-8 for every Python invocation Make spawns. Without this, CI runners
# whose default locale is C/POSIX (or any non-UTF-8) will crash with
# UnicodeEncodeError the first time argparse prints help text containing
# Chinese (which our codex / claude / aik CLIs all do). The launchers set the
# same vars themselves; this line covers the ``make smoke`` / ``make test`` /
# ``make run`` paths that bypass them.
export PYTHONUTF8 := 1
export PYTHONIOENCODING := utf-8
.PHONY: help run run-codex run-claude install bootstrap bootstrap-editable release test compile check version smoke
help:
@printf "%s\n" \
"make bootstrap - create .venv and install the toolkit locally" \
"make bootstrap-editable - create .venv and install in editable mode" \
"make release - build distributable release archives under dist/releases" \
"make run - run the top-level aik dispatcher from local source" \
"make run-codex - run the codex sub-tool directly" \
"make run-claude - run the claude sub-tool directly" \
"make install - install the toolkit in editable mode" \
"make version - print aik version from local source" \
"make compile - byte-compile package modules" \
"make test - run all unit + smoke tests under tests/" \
"make smoke - run launcher/module help smoke checks" \
"make check - run compile + tests"
run:
PYTHONPATH=src $(PYTHON) -m $(PACKAGE_MODULE)
run-codex:
PYTHONPATH=src $(PYTHON) -m $(CODEX_MODULE)
run-claude:
PYTHONPATH=src $(PYTHON) -m $(CLAUDE_MODULE)
bootstrap:
sh ./install.sh
bootstrap-editable:
sh ./install.sh --editable
release:
sh ./release.sh
install:
$(PIP) install -e .
version:
PYTHONPATH=src $(PYTHON) -m $(PACKAGE_MODULE) --version
compile:
$(PYTHON) -m py_compile \
src/$(PACKAGE_MODULE)/*.py \
src/$(PACKAGE_MODULE)/core/*.py \
src/$(PACKAGE_MODULE)/core/tui/*.py \
src/$(PACKAGE_MODULE)/codex/*.py \
src/$(PACKAGE_MODULE)/codex/tui/*.py \
src/$(PACKAGE_MODULE)/claude/*.py \
src/$(PACKAGE_MODULE)/claude/tui/*.py
test:
PYTHONPATH=src $(PYTHON) -m unittest discover -s tests -v
smoke:
sh ./install.sh --help >/dev/null
sh ./release.sh --help >/dev/null
sh ./aik --help >/dev/null
sh ./codex-session-toolkit --help >/dev/null
sh ./cc-clean --help >/dev/null
sh ./scripts/compat/cst-launcher.sh --help >/dev/null
PYTHONPATH=src $(PYTHON) -m $(PACKAGE_MODULE) --help >/dev/null
PYTHONPATH=src $(PYTHON) -m $(CODEX_MODULE) --help >/dev/null
PYTHONPATH=src $(PYTHON) -m $(CLAUDE_MODULE) --help >/dev/null
check: compile test smoke