-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (30 loc) · 862 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
VENV = venv
ifeq ($(OS),Windows_NT)
VENV_BIN = Scripts
else
VENV_BIN = bin
endif
.PHONY: all
all: mypy test lint sphinx
$(VENV)/$(VENV_BIN)/activate: requirements.txt
python3 -m venv $(VENV)
./$(VENV)/$(VENV_BIN)/pip install -r requirements.txt
.PHONY: clean
clean:
rm -rf $(VENV)
rm -rf docs-build
find . -type d -name ".pytest_cache" -prune -exec rm -rf "{}" \;
find . -type d -name ".mypy_cache" -prune -exec rm -rf "{}" \;
find . -type d -name "__pycache__" -prune -exec rm -rf "{}" \;
.PHONY: mypy
mypy: $(VENV)/$(VENV_BIN)/activate
./$(VENV)/$(VENV_BIN)/mypy rsx
.PHONY: test
test: $(VENV)/$(VENV_BIN)/activate
./$(VENV)/$(VENV_BIN)/pytest rsx
.PHONY: lint
lint: $(VENV)/$(VENV_BIN)/activate
./$(VENV)/$(VENV_BIN)/pylint rsx
.PHONY: sphinx
sphinx: $(VENV)/$(VENV_BIN)/activate
./$(VENV)/$(VENV_BIN)/sphinx-build -b html docs docs-build