-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (47 loc) · 1.38 KB
/
Makefile
File metadata and controls
61 lines (47 loc) · 1.38 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
# Variables
VENV = venv
PYTHON = $(VENV)/bin/python
PIP = $(VENV)/bin/pip
MYPY = $(VENV)/bin/mypy
FLAKE8 = $(VENV)/bin/flake8
PYTEST = $(VENV)/bin/pytest
STAMP = $(VENV)/.installed
all: install
$(VENV)/bin/activate:
python3 -m venv $(VENV)
$(STAMP): $(VENV)/bin/activate pyproject.toml
$(PIP) install --upgrade pip build wheel pydantic flake8 \
mypy pytest types-setuptools
$(PIP) install -e .
touch $(STAMP)
install: $(STAMP)
run: install
$(PYTHON) a_maze_ing.py config.txt
build: install
$(PYTHON) -m build --sdist --wheel --outdir .
@echo "\n[+] Package built! Files are in the root directory."
debug: install
$(PYTHON) -m pdb a_maze_ing.py config.txt
lint: install
$(FLAKE8) . --exclude $(VENV),build,dist,.pytest_cache
$(MYPY) . --exclude $(VENV) \
--explicit-package-bases \
--warn-return-any \
--warn-unused-ignores \
--ignore-missing-imports \
--disallow-untyped-defs \
--check-untyped-defs
lint-strict: install
$(FLAKE8) . --exclude $(VENV),build,dist,.pytest_cache
$(MYPY) . --exclude $(VENV) --explicit-package-bases --strict
test: install
PYTHONPATH=. $(PYTEST) tests/
clean:
rm -rf __pycache__ mazegen/__pycache__ tests/__pycache__
rm -rf *.egg-info build dist .mypy_cache .pytest_cache
rm -f maze_output.txt
rm -f mazegen-*.whl mazegen-*.tar.gz
fclean: clean
rm -rf $(VENV)
re: fclean all
.PHONY: all install run build debug lint lint-strict test clean fclean re