python/Makefile

23 lines
395 B
Makefile
Raw Permalink Normal View History

2022-05-31 08:47:25 +02:00
PYTHON ?= python3
VENV ?= .venv
SRC_DIR = aiovieter
2022-05-31 08:47:25 +02:00
.PHONY: venv
venv: $(VENV)/bin/activate
$(VENV)/bin/activate: setup.py setup.cfg
2022-05-31 08:47:25 +02:00
rm -rf '$(VENV)'
'$(PYTHON)' -m venv '$(VENV)'
'$(VENV)'/bin/pip install -e .[develop]
2022-05-31 08:47:25 +02:00
.PHONY: shell
shell: venv
@ '$(VENV)'/bin/python
.PHONY: lint
lint: venv
'$(VENV)/bin/flake8' '$(SRC_DIR)'
.PHONY: format
fmt: venv
'$(VENV)/bin/black' '$(SRC_DIR)'