-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (43 loc) · 977 Bytes
/
Copy pathMakefile
File metadata and controls
58 lines (43 loc) · 977 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
46
47
48
49
50
51
52
53
54
55
56
57
58
.PHONY: wheel docs
PYTHON3="python3.5"
DOCS_DEST="./dist/docs"
API_DOCS="./docs/api-doc"
define clean_api_docs
@echo "Clean api-docs directory"
@if [ -d ${API_DOCS} ]; then \
rm -r ${API_DOCS}; \
fi
endef
define clean_dist
@echo "Clean docs directory"
@if [ -d ./dist ]; then \
rm -r ./dist; \
fi
endef
define clean_after_wheel
@echo "Cleaning after wheel build"
rm -r ./build
rm -r ./*.egg-info
endef
docs:
@echo "Start generating docs"
@echo "Generate Api Docs"
$(call clean_api_docs)
sphinx-apidoc -f --no-toc -o ${API_DOCS} ./virgil_sdk
@echo "Check ${DOCS_DEST} exist"
@if [ -d ./dist ]; then \
if [ ! -d ${DOCS_DEST} ]; then \
mkdir ${DOCS_DEST}; \
fi \
else \
mkdir -p ${DOCS_DEST}; \
fi
sphinx-build ./docs ${DOCS_DEST}
wheel:
${PYTHON3} setup.py bdist_wheel --universal --python-tag py2.py3
$(call clean_after_wheel)
upload_testpypi:
twine upload -r pypitest dist/*
clean:
$(call clean_api_docs)
$(call clean_dist)