forked from fwkz/riposte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (36 loc) · 802 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
50
define colorecho
@tput setaf 6
@echo $1
@tput sgr0
endef
.PHONY: all
all: reformat tests lint
.PHONY: build
build: clean
$(call colorecho, "\n Building package distributions...")
python setup.py sdist bdist_wheel
.PHONY: publish
publish: build
twine upload dist/*
.PHONY: tests
tests: clean
$(call colorecho, "\nRunning tests...")
pytest $(ARGS)
.PHONY: lint
lint:
$(call colorecho, "\nLinting...")
flake8
black --check --diff .
isort --check-only --diff .
.PHONY: reformat
reformat:
$(call colorecho, "\nReformatting...")
black .
isort .
.PHONY: clean
clean:
$(call colorecho, "\nRemoving artifacts...")
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
rm -rf build dist pip-wheel-metadata