From f06ce93efe9d434866160fce72b1558912d984f9 Mon Sep 17 00:00:00 2001 From: Mathieu Leplatre Date: Thu, 21 Jul 2022 12:47:03 +0200 Subject: [PATCH 1/3] Fix make from fresh clone --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 04f9fde5..d537146e 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ help: @echo "JBI make rules:" @echo "" @echo "Local" + @echo " clean - clean local cache folders" @echo " format - run formatters (black, isort), fix in place" @echo " lint - run linters" @echo " start - run the API service locally" @@ -27,10 +28,16 @@ help: @echo "" @echo " help - see this text" +.PHONY: clean +clean: + find . -name "__pycache__" | xargs rm -rf + rm -rf .mypy_cache .pytest_cache .coverage .venv + + install: $(INSTALL_STAMP) $(INSTALL_STAMP): poetry.lock @if [ -z $(shell command -v poetry 2> /dev/null) ]; then echo "Poetry could not be found. See https://python-poetry.org/docs/"; exit 2; fi - poetry install --no-root + POETRY_VIRTUALENVS_IN_PROJECT=1 poetry install --no-root touch $(INSTALL_STAMP) .PHONY: build From b636b9fb7102c2afe794e834edb7f1ef398d18b7 Mon Sep 17 00:00:00 2001 From: Mathieu Leplatre Date: Thu, 21 Jul 2022 15:00:27 +0200 Subject: [PATCH 2/3] Remove variable definition (it's not an env var) --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index d537146e..9007c421 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,6 @@ _GID ?= 10001 VENV := $(shell echo $${VIRTUAL_ENV-.venv}) INSTALL_STAMP = $(VENV)/.install.stamp -POETRY_VIRTUALENVS_IN_PROJECT = true .PHONY: help help: From fa2f98c72539bafefe241c0c15de19dc768afb17 Mon Sep 17 00:00:00 2001 From: Mathieu Leplatre Date: Thu, 21 Jul 2022 17:46:26 +0200 Subject: [PATCH 3/3] Remove quotes from Makefile target --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 337eb8f9..35840544 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ _GID ?= 10001 VENV := $(shell echo $${VIRTUAL_ENV-.venv}) INSTALL_STAMP = $(VENV)/.install.stamp -DOTENV_FILE = ".env" +DOTENV_FILE = .env .PHONY: help help: @@ -59,7 +59,7 @@ start: $(INSTALL_STAMP) $(DOTENV_FILE) poetry run python -m src.app.api $(DOTENV_FILE): - cp -n .env.example $(DOTENV_FILE) + cp .env.example $(DOTENV_FILE) .PHONY: docker-shell docker-shell: $(DOTENV_FILE)