diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..b73509f00068e7ec99de65cccc7e4ac3d889303f --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +PIP ?= pip -q +POETRY ?= poetry +PYTHON ?= python3.9 +VENV ?= venv + +pip = python -m $(PIP) +poetry = python -m $(POETRY) +venv = . $(VENV)/bin/activate && + +.PHONY: clean +clean: + $(RM) -r $(VENV) + +$(VENV): $(VENV)/touchfile +$(VENV)/touchfile: + test -d $(VENV) || $(PYTHON) -m venv $(VENV) + $(venv) $(pip) install -U pip + $(venv) $(pip) install poetry + $(venv) $(poetry) install + touch $@ + +.PHONY: test +test: $(VENV) + $(venv) python manage.py test