-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (18 loc) · 718 Bytes
/
Makefile
File metadata and controls
24 lines (18 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.EXPORT_ALL_VARIABLES:
.PHONY: venv install pre-commit clean
GLOBAL_PYTHON = $(shell python3.10 -c 'import sys; print(sys.executable)')
LOCAL_PYTHON = ./.venv/bin/python
LOCAL_PRE_COMMIT = ./.venv/lib/python3.10/site-packages/pre_commit
setup: venv install pre-commit
venv: $(GLOBAL_PYTHON)
@echo "Creating .venv..."
poetry env use $(GLOBAL_PYTHON)
install: ${LOCAL_PYTHON}
@echo "Installing dependencies..."
poetry install --no-root --sync
pre-commit: ${LOCAL_PYTHON} ${LOCAL_PRE_COMMIT}
@echo "Setting up pre-commit..."
. ./.venv/bin/activate && poetry run pre-commit install
. ./.venv/bin/activate && poetry run pre-commit autoupdate
clean:
rm -rf .git/hooks .venv poetry.lock