Skip to content

Commit b01ae6d

Browse files
committed
fix venv creation
1 parent e862a14 commit b01ae6d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ else
3131
PLONE_VERSION := 6.1.4
3232
endif
3333

34+
ifdef CI
35+
UV_VENV_ARGS :=
36+
else
37+
UV_VENV_ARGS := --python=3.10
38+
endif
39+
3440
VENV_FOLDER=$(BACKEND_FOLDER)/.venv
3541
export VIRTUAL_ENV=$(VENV_FOLDER)
3642
BIN_FOLDER=$(VENV_FOLDER)/bin
@@ -54,11 +60,7 @@ requirements-mxdev.txt: pyproject.toml mx.ini ## Generate constraints file
5460

5561
$(VENV_FOLDER): requirements-mxdev.txt ## Install dependencies
5662
@echo "$(GREEN)==> Install environment$(RESET)"
57-
ifdef CI
58-
@uv venv $(VENV_FOLDER)
59-
else
60-
@uv venv --python=3.10 $(VENV_FOLDER)
61-
endif
63+
@if [[ -d "$(VENV_FOLDER)" ]]; then echo "$(YELLOW)==> Environment already exists at $(VENV_FOLDER)$(RESET)"; else uv venv $(UV_VENV_ARGS) $(VENV_FOLDER); fi
6264
@uv pip install -r requirements-mxdev.txt
6365

6466
.PHONY: sync

0 commit comments

Comments
 (0)