-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (36 loc) · 885 Bytes
/
Makefile
File metadata and controls
45 lines (36 loc) · 885 Bytes
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
.PHONY: install install-dev test lint format clean build upload help
help:
@echo "PDF Sword - 开发命令"
@echo ""
@echo "install - 安装生产依赖"
@echo "install-dev - 安装开发依赖"
@echo "test - 运行测试"
@echo "lint - 运行代码检查"
@echo "format - 格式化代码"
@echo "clean - 清理构建文件"
@echo "build - 构建包"
@echo "upload - 上传到 PyPI"
install:
pip install -e .
install-dev:
pip install -e ".[dev]"
test:
pytest tests/ -v
lint:
ruff check src/
mypy src/
format:
black src/ tests/
ruff check --fix src/ tests/
clean:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
rm -rf .pytest_cache/
rm -rf .mypy_cache/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
build: clean
python -m build
upload: build
twine upload dist/*