-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
83 lines (75 loc) · 1.76 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
.PHONY: init
# init development
init:
python3 -m venv venv
.PHONY: clean
# clean development
clean:
rm -rf *.csv
rm -rf *.camel
rm -rf *.sqlite
rm -rf *.json
rm -rf *.txt
rm -rf *.db
rm -rf zakat_test_db
rm -rf zakat/*.csv
rm -rf zakat/*.camel
rm -rf zakat/*.json
rm -rf zakat/*.db
rm -rf zakat/zakat_test_db
rm -rf tests/*.csv
rm -rf tests/*.camel
rm -rf tests/*.sqlite
rm -rf tests/*.json
rm -rf tests/*.db
rm -rf tests/zakat_test_db
rm -rf snapshots
.PHONY: dev-build
# dev-build the library
dev-build:
python3 setup.py build_ext --inplace
.PHONY: deps
# deps development
deps:
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade wheel
python3 -m pip install --upgrade setuptools
python3 -m pip install --upgrade twine
python3 -m pip install --upgrade pyyaml
python3 -m pip install --upgrade camelx
python3 -m pip install --upgrade pony
python3 -m pip install --upgrade pytest==8.2.2
python3 -m pip install --upgrade pytest-runner==6.0.1
python3 -m pip install --upgrade twine
python3 -m pip install --upgrade build
.PHONY: pytest
# run pytest
pytest:
make clean && pytest --capture=no
.PHONY: test
# run tests
test:
make clean && python3 zakat/zakat_tracker.py
.PHONY: deploy
# deploy package
deploy:
rm -rf dist/
python3 -m build
python3 -m twine upload --repository zakat dist/*
# show help
help:
@echo ''
@echo 'Usage:'
@echo ' make [target]'
@echo ''
@echo 'Targets:'
@awk '/^[a-zA-Z\-0-9]+:/ { \
helpMessage = match(lastLine, /^# (.*)/); \
if (helpMessage) { \
helpCommand = substr($$1, 0, index($$1, ":")-1); \
helpMessage = substr(lastLine, RSTART + 2, RLENGTH); \
printf "\033[36m%-22s\033[0m %s\n", helpCommand,helpMessage; \
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help