From 70339075a4648a3524b80fc2410ebcbbca405575 Mon Sep 17 00:00:00 2001 From: Ali Al-Alak Date: Sun, 6 Jul 2025 22:09:02 +0200 Subject: [PATCH] Updated makefile to fit multiple package management workflows --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 01bc03c44..249dbcade 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ export PATH := ${HOME}/.local/bin:$(PATH) -IS_POETRY := $(shell pip freeze | grep "poetry==") +IS_POETRY := $(shell command -v poetry 2>/dev/null) CURRENT_VERSION := $(shell poetry version -s) @@ -25,7 +25,14 @@ help: .install-poetry: - @if [ -z ${IS_POETRY} ]; then pip install poetry; fi +ifdef IS_POETRY + @: +else +ifndef VIRTUAL_ENV + $(error Please activate a virtual environment or install poetry globally with your preffered tool) +endif + @pip install poetry +endif update: .install-poetry poetry update