-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·50 lines (35 loc) · 1.09 KB
/
Copy pathMakefile
File metadata and controls
executable file
·50 lines (35 loc) · 1.09 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
#* Makefile for A-Maze-ing
VENV = .venv
PYTHON = python3
PIP = ./$(VENV)/bin/pip
MYPY = ./$(VENV)/bin/mypy
FLAKE8 = ./$(VENV)/bin/flake8
PROGRAM_NAME = a_maze_ing
CONFIG_FILE = config.txt
PACKAGES_TO_INSTALL = mypy flake8 mlx-2.2-cp312-cp312-linux_x86_64.whl
PDB_COMMAND = $(PYTHON) -m pdb $(PROGRAM_NAME).py
CLEAN_COMMAND = rm -rf $$(find . -name "__pycache__" -o -name ".mypy_cache")
MYPY_FLAGS = --warn-return-any --warn-unused-ignores --ignore-missing-imports \
--disallow-untyped-defs --check-untyped-defs
LINT_COMMAND = $(FLAKE8) . --exclude $(VENV) & $(MYPY) . $(MYPY_FLAGS) --exclude $(VENV)
CREATE_VENV = virtualenv $(VENV)
INSTALL_DEPS = $(PIP) install $(PACKAGES_TO_INSTALL)
#* Install a Python package using pipx
install:
@echo "Installing dependencies..."
@$(CREATE_VENV)
@$(INSTALL_DEPS)
@echo "Dependencies installed successfully."
#* Run the program
run:
@$(PYTHON) $(PROGRAM_NAME).py $(CONFIG_FILE)
#* Debug the program
debug:
@$(PDB_COMMAND)
#* Clean the program
clean:
@$(CLEAN_COMMAND)
@echo "Program cleaned successfully."
#* Lint the program
lint:
$(LINT_COMMAND)