-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
41 lines (34 loc) · 814 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
PWD := $(shell pwd)
MODULE := minato
POETRY := poetry
PYTHON := $(POETRY) run python
PYTEST := $(POETRY) run pytest
PYSEN := $(POETRY) run pysen
PYTHONPATH := $(PWD)
.PHONY: all
all: format lint test
.PHONY: test
test:
PYTHONPATH=$(PYTHONPATH) $(PYTEST)
.PHONY: lint
lint:
PYTHONPATH=$(PYTHONPATH) $(PYSEN) run lint
.PHONY: format
format:
PYTHONPATH=$(PYTHONPATH) $(PYSEN) run format
.PHONY: clean
clean: clean-pyc clean-build
.PHONY: clean-pyc
clean-pyc:
rm -rf .pytest_cache
rm -rf .mypy_cache
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
.PHONY: clean-build
clean-build:
rm -rf build/
rm -rf dist/
rm -rf $(MODULE).egg-info/
rm -rf pip-wheel-metadata/