From 633291e3d5f33bce1367bfc74ed7ff22cf8e2dc8 Mon Sep 17 00:00:00 2001 From: PatillaCode Date: Fri, 16 Jun 2023 15:33:46 +0200 Subject: [PATCH] added a minimal makefile --- Makefile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c70379c --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +SHELL := /bin/bash + +.PHONY: help install dev-install + +.DEFAULT_GOAL := help + +.SILENT: + +help: + @echo "Please use 'make ' where is one of the following:" + @echo " help Return this message with usage instructions." + @echo " install Will install the dependencies and create a virtual environment." + @echo " dev-install Will install the dev dependencies too." + +dev-install:create-venv install-dev-dependencies install-pre-commit + +install: create-venv install-dependencies farewell + +install-dependencies: + @echo "Installing dependencies..." && \ + pip install . >> /dev/null + +create-venv: + @echo "Creating virtual environment..." && \ + python -m venv venv && \ + source venv/bin/activate && \ + pip install --upgrade pip + +install-dev-dependencies: + @echo "Installing dependencies..." && \ + source venv/bin/activate && \ + pip install -r requirements.txt + +install-pre-commit: + @echo "Installing pre-commit hooks..." && \ + source venv/bin/activate && \ + pre-commit install