From e73980bd65dd7a0308d3d395367d50379b6db772 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Tue, 1 Aug 2023 01:02:18 +0200 Subject: [PATCH] Build inside a venv and use poetry in the top level Makefile. --- Makefile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c03bfee1b..c8406114a 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,8 @@ endif endif + venv = source ./venv/bin/activate + SMP_FLAGS = ifneq ($(shell which nproc 2> /dev/null),) SMP_FLAGS = -j$(shell nproc) @@ -55,8 +57,17 @@ check_dir: fi -install: check_dir - @./bootstrap/ccb.py $(DEVTOOLSET_OPTION) --project=support --project=coriolis --make="$(SMP_FLAGS) install" +check_venv: + @if [ ! -d "./venv" ]; then python3 -m venv venv; fi + + +poetry_deps: check_venv + @$(venv); poetry install --no-root + + +install: check_dir poetry_deps + @$(venv); ./bootstrap/ccb.py $(DEVTOOLSET_OPTION) --project=coriolis \ + --make="$(SMP_FLAGS) --doc install" @echo ""; \ echo "============================================================================"; \ echo "Coriolis has been successfully built"; \