Skip to content

Commit d5a8e63

Browse files
committed
Refine Makefile
1 parent 2006f4e commit d5a8e63

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ PY_PATH := $(shell command -v python3 2>/dev/null || command -v python 2>/dev/nu
2121
# 1. Use local venv if present
2222
# 2. Otherwise use active python on PATH (important for CI)
2323
# 3. Fall back to best available version
24-
PYTHON ?= $(if $(wildcard $(VENV_BIN)/python),$(VENV_BIN)/python,$(if $(PY_PATH),$(PY_PATH),$(PY_BEST)))
24+
# 4. Final fallback to 'python3' literal for clear error messages
25+
PYTHON ?= $(if $(wildcard $(VENV_BIN)/python),$(VENV_BIN)/python,$(if $(PY_PATH),$(PY_PATH),$(if $(PY_BEST),$(PY_BEST),python3)))
2526

2627
# Derived tool commands (always use -m to ensure correct environment)
2728
PIP := $(PYTHON) -m pip
@@ -87,7 +88,7 @@ dev:
8788
echo "❌ Error: venv creation failed - $(VENV_BIN)/python not found"; \
8889
exit 1; \
8990
fi; \
90-
$(VENV_BIN)/python -m pip install -U pip wheel; \
91+
$(VENV_BIN)/python -m pip install -U pip setuptools wheel; \
9192
fi
9293
@echo "📦 Installing dev dependencies..."
9394
@$(DEV_ENV) $(VENV_BIN)/python -m pip install -e .'[dev]'
@@ -107,7 +108,7 @@ venv:
107108
echo "❌ Error: venv creation failed - $(VENV_BIN)/python not found"; \
108109
exit 1; \
109110
fi
110-
@$(VENV_BIN)/python -m pip install -U pip wheel
111+
@$(VENV_BIN)/python -m pip install -U pip setuptools wheel
111112
@echo "✅ venv ready. Activate with: source venv/bin/activate"
112113

113114
clean-venv:

0 commit comments

Comments
 (0)