2023-03-23 05:10:59 +00:00
|
|
|
POETRY_EXISTS := $(shell which poetry &> /dev/null)
|
2023-03-23 06:14:33 +00:00
|
|
|
PRE_COMMIT_HOOK := .git/hooks/pre-commit
|
2023-03-23 05:10:59 +00:00
|
|
|
|
|
|
|
|
pre-commit:
|
|
|
|
|
poetry run pre-commit
|
|
|
|
|
|
|
|
|
|
install-poetry:
|
|
|
|
|
ifndef POETRY_EXISTS
|
|
|
|
|
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.4.0 python3 -
|
|
|
|
|
endif
|
2023-03-23 06:14:33 +00:00
|
|
|
poetry install
|
|
|
|
|
|
|
|
|
|
$(PRE_COMMIT_HOOK):
|
|
|
|
|
poetry run pre-commit install --install-hooks
|
2023-03-23 05:10:59 +00:00
|
|
|
|
2023-03-23 06:14:33 +00:00
|
|
|
setup-development-environment: install-poetry $(PRE_COMMIT_HOOK)
|