-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
50 lines (40 loc) · 881 Bytes
/
Makefile
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
# 伪目标
.PHONY: dev pro build clean upload publish
# 发布 make release
.PHONY: release
release:
python ./version-cli/auto_release.py
# 打包
build:
python setup.py sdist bdist_wheel --python-tag py2.py3
# 清空打包产物
clean:
rm -rf dist build *.egg-info .pytest_cache
# 上传打包产物到 pypi
upload:
twine check dist/*
twine upload dist/*
# 发布 make publish
publish:
make clean
make build
make upload
make clean
# 运行所有测试
.PHONY: test
test:
pytest -c pytest.ini tests/api/test_index.py
# 安装开发环境依赖
# make install-require
.PHONY: install-require
install-require:
pip3 install -r requirements/development.txt
# 快速提交
# make fix
.PHONY: fix
fix:
git add . && git commit -m 'fix' && git push
# 更新文档
.PHONY: update-doc
update-doc:
cd ./doc && sphinx-apidoc -f -o ./source ../stock_open_api/ && cd ../