Add install-local target for testing local package installation
- Add make install-local target to install from locally built wheel package - Provides equivalent to PyPI installation for testing before publication - Includes comprehensive installation validation with import and CLI tests - Shows package information and validates core functionality - Perfect for testing the installation experience without PyPI dependency 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
46
Makefile
46
Makefile
@@ -1,6 +1,6 @@
|
||||
# Makefile for Kaizen Agentic development tasks
|
||||
|
||||
.PHONY: help setup-complete setup-structure setup-python setup-tools setup-docs setup-tests setup-verify ensure-project-structure install-dev standards-check standards-fix standards-test test test-all build clean lint format venv-status agents-list agents-update agents-validate agents-status agents-install-cli release-check release-prepare release-test release-publish release-finalize release-rollback
|
||||
.PHONY: help setup-complete setup-structure setup-python setup-tools setup-docs setup-tests setup-verify ensure-project-structure install-dev install-local standards-check standards-fix standards-test test test-all build clean lint format venv-status agents-list agents-update agents-validate agents-status agents-install-cli release-check release-prepare release-test release-publish release-finalize release-rollback
|
||||
|
||||
# Variables
|
||||
VENV = .venv
|
||||
@@ -24,6 +24,7 @@ help:
|
||||
@echo " setup-tests - Create testing infrastructure"
|
||||
@echo " setup-verify - Verify complete setup functionality"
|
||||
@echo " install-dev - Install package in development mode"
|
||||
@echo " install-local - Install from locally built package (test PyPI installation)"
|
||||
@echo " venv-status - Check if venv is active"
|
||||
@echo ""
|
||||
@echo "Standards Compliance:"
|
||||
@@ -84,6 +85,49 @@ install-dev: $(VENV)/bin/activate
|
||||
@$(VENV_PIP) install -e .
|
||||
@echo "✅ Package installed in development mode"
|
||||
|
||||
# Install from locally built package (test PyPI installation)
|
||||
install-local: $(VENV)/bin/activate
|
||||
@echo "📦 Installing from locally built package..."
|
||||
@if [ ! -d "dist" ] || [ -z "$$(ls dist/*.whl 2>/dev/null)" ]; then \
|
||||
echo "❌ No wheel package found in dist/"; \
|
||||
echo " Run 'make build' or 'make release-prepare' first"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
WHEEL_FILE=$$(ls dist/*.whl | head -1); \
|
||||
VERSION=$$(basename "$$WHEEL_FILE" | sed 's/kaizen_agentic-\(.*\)-py3.*/\1/'); \
|
||||
echo " Installing kaizen-agentic v$$VERSION from local wheel..."; \
|
||||
$(VENV_PIP) install --upgrade pip; \
|
||||
$(VENV_PIP) uninstall -y kaizen-agentic 2>/dev/null || true; \
|
||||
$(VENV_PIP) install "$$WHEEL_FILE" --force-reinstall; \
|
||||
echo ""; \
|
||||
echo "✅ Local package installed successfully!"; \
|
||||
echo " Version: $$VERSION"; \
|
||||
echo " Package contents:"; \
|
||||
$(VENV_PIP) show kaizen-agentic; \
|
||||
echo ""; \
|
||||
echo "🧪 Testing installation..."; \
|
||||
if $(VENV_PYTHON) -c "import kaizen_agentic; print(f'✅ Import successful: kaizen_agentic v{kaizen_agentic.__version__}')" 2>/dev/null; then \
|
||||
echo " ✅ Package import test passed"; \
|
||||
else \
|
||||
echo " ❌ Package import test failed"; \
|
||||
$(VENV_PYTHON) -c "import kaizen_agentic" 2>&1 || true; \
|
||||
fi; \
|
||||
if $(VENV)/bin/kaizen-agentic --version 2>/dev/null; then \
|
||||
echo " ✅ CLI command test passed"; \
|
||||
else \
|
||||
echo " ❌ CLI command test failed"; \
|
||||
$(VENV)/bin/kaizen-agentic --version 2>&1 || true; \
|
||||
fi; \
|
||||
if $(VENV)/bin/kaizen-agentic list 2>/dev/null | head -5; then \
|
||||
echo " ✅ CLI functionality test passed"; \
|
||||
else \
|
||||
echo " ❌ CLI functionality test failed"; \
|
||||
fi; \
|
||||
echo ""; \
|
||||
echo "💡 Usage:"; \
|
||||
echo " source $(VENV)/bin/activate"; \
|
||||
echo " kaizen-agentic --help"
|
||||
|
||||
# Ensure proper Python project structure exists
|
||||
ensure-project-structure:
|
||||
@echo "🔍 Ensuring proper Python project structure..."
|
||||
|
||||
Reference in New Issue
Block a user