build: add Makefile for build tasks

Signed-off-by: Tom Carrio <tom@carrio.dev>
This commit is contained in:
Tom Carrio 2022-11-22 17:27:52 -05:00
parent a18481c75e
commit 34d7892d54
1 changed files with 23 additions and 0 deletions

23
Makefile Normal file
View File

@ -0,0 +1,23 @@
VENV = . .venv/bin/activate
.venv: requirements-dev.txt
test -d .venv || python -m virtualenv .venv
$(VENV); pip install -Ur requirements-dev.txt
.PHONY: test
test: .venv
$(VENV); pytest
.PHONY: lint
lint: .venv
$(VENV); black .
$(VENV); flake8 .
$(VENV); isort .
.PHONY: clean
clean:
@rm -rf .venv
@find -iname "*.pyc" -delete
.PHONY: all
all: lint test