-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (48 loc) · 1.66 KB
/
Makefile
File metadata and controls
68 lines (48 loc) · 1.66 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
# Minimal developer workflow
.PHONY: dev run lint test export clean
dev:
uv venv || python -m venv .venv
uv sync || pip install -r requirements.txt ruff mypy bandit
run:
python yt_audio_backup_gui.py
lint:
ruff check .
mypy --install-types --non-interactive || true
test:
python - <<'PY'
print("Smoke test: import OK")
import yt_dlp
print("yt_dlp version:", getattr(yt_dlp, "__version__", "unknown"))
PY
export:
# lock and export a pip requirements file from uv if available
uv export --no-dev --format requirements-txt > requirements.lock.txt || echo "uv not available"
clean:
rm -rf .mypy_cache .ruff_cache .pytest_cache dist build *.spec
# ---- Binary builds (PyInstaller) ----
.PHONY: build build-win build-mac build-linux distclean
build:
pyinstaller yt_audio_backup.spec
build-win:
pyinstaller yt_audio_backup.spec
build-mac:
pyinstaller yt_audio_backup.spec
build-linux:
pyinstaller yt_audio_backup.spec
distclean:
rm -rf build dist *.spec
# ---- Dependency check ----
.PHONY: check-deps
check-deps:
@echo "Checking for ffmpeg, ffprobe, mp3gain..."
@if command -v ffmpeg >/dev/null 2>&1; then echo "✅ ffmpeg: $$(command -v ffmpeg)"; else echo "❌ ffmpeg NOT found"; fi
@if command -v ffprobe >/dev/null 2>&1; then echo "✅ ffprobe: $$(command -v ffprobe)"; else echo "❌ ffprobe NOT found"; fi
@if command -v mp3gain >/dev/null 2>&1; then echo "✅ mp3gain: $$(command -v mp3gain)"; else echo "❌ mp3gain NOT found"; fi
# ---- i18n key drift check ----
.PHONY: check-i18n validate ci
check-i18n:
python scripts/check_i18n_keys.py
# Run everything you'd want in CI locally
validate: lint test check-i18n
# Short alias for CI systems
ci: validate