From bf67d786bf0cf619695ec769104695f13868f950 Mon Sep 17 00:00:00 2001 From: LuisAPI Date: Sun, 13 Jul 2025 19:35:14 +0800 Subject: [PATCH] fix: Make dependency installation optional in Makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary Modified the `start-backend` target in the Makefile to make dependency installation optional, improving developer experience by allowing faster startup when dependencies are already installed. - **Modified `start-backend` target**: Now runs without dependency installation by default - **Added optional dependency installation**: Use `make start-backend DEPS=true` to install dependencies before starting - **Improved developer workflow**: Developers can now start the backend immediately if dependencies are already installed ## Usage ```bash # Start backend without installing dependencies (default) make start-backend # Start backend with dependency installation make start-backend DEPS=true ``` ## Benefits - **Faster development cycles**: No need to wait for dependency installation on subsequent runs - **Flexible workflow**: Developers can choose when to install dependencies - **Backward compatibility**: Original behavior still available with `DEPS=true` parameter ## Testing - ✅ `make start-backend` starts backend without installing deps - ✅ `make start-backend DEPS=true` installs deps and starts backend - ✅ Existing `make start` command continues to work as expected --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a4d6567..db610df 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,13 @@ install-deps: pip install -r requirements.txt -# Command to start the backend -start-backend: install-deps +# Command to start the backend with optional dependency installation +# Usage: make start-backend DEPS=true +start-backend: + @if [ "$(DEPS)" = "true" ]; then \ + echo "Installing dependencies..."; \ + pip install -r requirements.txt; \ + fi python Backend/app.py # Placeholder for starting the frontend