-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (51 loc) · 1.17 KB
/
Makefile
File metadata and controls
65 lines (51 loc) · 1.17 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
.PHONY: all
all: lint test
.PHONY: test
test:
pytest tests/
.PHONY: test_incr
test_incr:
pytest tests/ --testmon --no-cov -n 0
.PHONY: lint
lint:
flake8 .
./commit_lint.sh
.PHONY: format
format:
isort .
black .
all: clean dist
clean:
python setup.py clean --all
rm -rf dist build
build:
python setup.py build
tar_dist:
python setup.py sdist
reinstall:
which gmail-nexus && pip uninstall -y gmail-nexus || echo "no gmail-api-wrapper found"
pip install .
whl_dist:
python setup.py bdist_wheel -d dist/
publish: clean whl_dist
twine upload dist/*
.PHONY: clean build dist all whl_dist reinstall
.PHONY: help
help:
@echo "Usage:"
@echo " make"
@echo " Run flake8 & pytest"
@echo " make test"
@echo " Run pytest & output coverage results"
@echo " make test_incr"
@echo " Run only tests with recent changes (speedup!)"
@echo " make lint"
@echo " Run the flake8 linter"
@echo " make format"
@echo " Auto-format Python code"
@echo " make package"
@echo " Build the package and upload it to SIL's Pip Registry"
@echo " make clean"
@echo " Remove autogenerated files like __py_cache__"
@echo " make help"
@echo " Display usage information"