Skip to content

Commit 66aedbe

Browse files
committed
build: add Makefile for local and docker development
1 parent ccc8aa0 commit 66aedbe

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

Makefile

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Makefile for sysinfo-cli project
2+
3+
PYTHON := python
4+
PIP := python -m pip
5+
6+
.PHONY: install dev lint format test run build docker-build docker-run clean
7+
8+
install:
9+
$(PIP) install --upgrade pip
10+
$(PIP) install -e .
11+
12+
dev:
13+
$(PIP) install --upgrade pip
14+
$(PIP) install -e ".[dev]"
15+
16+
lint:
17+
ruff check .
18+
19+
format:
20+
black .
21+
22+
test:
23+
pytest -q
24+
25+
run:
26+
$(PYTHON) -m sysinfo.cli
27+
28+
run-json:
29+
$(PYTHON) -m sysinfo.cli --json
30+
31+
build:
32+
$(PYTHON) -m pip install build >/dev/null 2>&1 || true
33+
$(PYTHON) -m build
34+
35+
docker-build:
36+
docker build -t sysinfo-cli:local .
37+
38+
docker-run:
39+
docker run --rm sysinfo-cli:local --json
40+
41+
clean:
42+
rm -rf dist build *.egg-info .pytest_cache .ruff_cache .mypy_cache
43+
find . -type d -name "__pycache__" -exec rm -rf {} +
44+

0 commit comments

Comments
 (0)