feat: reorganize Makefile installation targets for better UX

Simplified installation process with clearer, more intuitive targets:

- NEW: `make install` - One-command global installation (recommended)
- NEW: `make uninstall` - Clean removal of global installation
- RENAMED: install-deps → install-user-deps (clearer purpose)
- RENAMED: install-deps-force → install-force-deps (better naming)
- RENAMED: install-system → install-system-deps (clearer scope)
- UPDATED: Help messages and cross-references throughout

The new `make install` target:
1. Creates user virtual environment with dependencies
2. Installs markitect binary to ~/bin/
3. Provides clear next steps and verification

This resolves the confusing 8-target installation matrix with a simple,
reliable one-command solution that works from any directory.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-25 20:28:29 +02:00
parent 49724d2ae5
commit ed27dee5a0

View File

@@ -1,7 +1,7 @@
# MarkiTect - Advanced Markdown Engine # MarkiTect - Advanced Markdown Engine
# Makefile for common development tasks # Makefile for common development tasks
.PHONY: help setup install-dev install-home install-home-venv install-deps install-deps-force install-deps-venv install-system list-deps setup-dev test build clean update status lint format check-deps venv-status update-digest add-diary-entry test-status test-new test-coverage test-arch test-foundation test-infrastructure test-integration test-domain test-service test-application test-presentation test-quick test-layers test-random test-random-seed test-random-repeat test-install-randomly test-clean test-tdd test-changed test-module test-cache-clean test-efficient cli-help release-status release-validate release-prepare release-build release-publish release-dry-run chaos-validate chaos-matrix chaos-inject chaos-report cost-help .PHONY: help setup install install-dev uninstall install-home install-home-venv install-user-deps install-force-deps install-deps-venv install-system-deps list-deps setup-dev test build clean update status lint format check-deps venv-status update-digest add-diary-entry test-status test-new test-coverage test-arch test-foundation test-infrastructure test-integration test-domain test-service test-application test-presentation test-quick test-layers test-random test-random-seed test-random-repeat test-install-randomly test-clean test-tdd test-changed test-module test-cache-clean test-efficient cli-help release-status release-validate release-prepare release-build release-publish release-dry-run chaos-validate chaos-matrix chaos-inject chaos-report cost-help
# Default target # Default target
help: help:
@@ -13,17 +13,17 @@ help:
@echo "" @echo ""
@echo "Setup & Installation:" @echo "Setup & Installation:"
@echo " setup - Initial project setup (venv + install-dev)" @echo " setup - Initial project setup (venv + install-dev)"
@echo " install - Install markitect globally (recommended)"
@echo " install-dev - Install package in development mode" @echo " install-dev - Install package in development mode"
@echo " install-home - Install markitect binary to ~/bin/" @echo " uninstall - Remove global markitect installation"
@echo " install-deps - Install dependencies (tries user-local first)"
@echo " install-deps-force - Force install with --break-system-packages"
@echo " install-deps-venv - Install to user virtual environment"
@echo " install-home-venv - Install binary using user virtual environment"
@echo " install-system - Install system dependencies via apt (requires sudo)"
@echo " list-deps - List required dependencies for markitect" @echo " list-deps - List required dependencies for markitect"
@echo " setup-dev - Install with development dependencies"
@echo " venv-status - Check if venv is active" @echo " venv-status - Check if venv is active"
@echo "" @echo ""
@echo "Advanced Installation:"
@echo " install-user-deps - Install dependencies to user location only"
@echo " install-system-deps - Install dependencies via system packages (sudo)"
@echo " install-force-deps - Force install with --break-system-packages"
@echo ""
@echo "Development:" @echo "Development:"
@echo " test - Run core tests (excluding capability-specific tests)" @echo " test - Run core tests (excluding capability-specific tests)"
@echo " test-capabilities - Run all capability-specific tests" @echo " test-capabilities - Run all capability-specific tests"
@@ -141,6 +141,40 @@ $(VENV)/bin/activate:
$(PYTHON) -m venv $(VENV) $(PYTHON) -m venv $(VENV)
$(VENV_PIP) install --upgrade pip setuptools wheel $(VENV_PIP) install --upgrade pip setuptools wheel
# Install markitect globally (recommended approach)
install:
@echo "🚀 Installing MarkiTect globally..."
@echo "📦 Creating user virtual environment with dependencies..."
@$(MAKE) --no-print-directory install-deps-venv
@echo "🏠 Installing markitect binary to ~/bin/..."
@$(MAKE) --no-print-directory install-home-venv
@echo ""
@echo "✅ MarkiTect installed successfully!"
@echo "💡 Make sure ~/bin is in your PATH:"
@echo " export PATH=\"$$HOME/bin:$$PATH\""
@echo ""
@echo "🧪 Test installation:"
@echo " markitect version"
# Remove global markitect installation
uninstall:
@echo "🗑️ Removing MarkiTect global installation..."
@if [ -f "$$HOME/bin/markitect" ]; then \
echo " Removing binary: $$HOME/bin/markitect"; \
rm "$$HOME/bin/markitect"; \
echo " ✅ Binary removed"; \
else \
echo " Binary not found at $$HOME/bin/markitect"; \
fi
@if [ -d "$$HOME/.local/markitect-venv" ]; then \
echo " Removing virtual environment: $$HOME/.local/markitect-venv"; \
rm -rf "$$HOME/.local/markitect-venv"; \
echo " ✅ Virtual environment removed"; \
else \
echo " Virtual environment not found"; \
fi
@echo "✅ MarkiTect uninstalled successfully!"
# Install package in development mode # Install package in development mode
install-dev: $(VENV)/bin/activate install-dev: $(VENV)/bin/activate
@echo "📦 Installing MarkiTect in development mode..." @echo "📦 Installing MarkiTect in development mode..."
@@ -215,13 +249,14 @@ list-deps:
@echo " toml - TOML configuration parsing" @echo " toml - TOML configuration parsing"
@echo "" @echo ""
@echo "🔧 Installation options:" @echo "🔧 Installation options:"
@echo " make install-deps - Install user-local (recommended)" @echo " make install - Install globally (recommended)"
@echo " make install-system - Install via apt + pip --user (requires sudo)" @echo " make install-user-deps - Install user-local dependencies only"
@echo " make install-system-deps - Install via apt + pip --user (requires sudo)"
@echo " pip3 install --user [packages] - Manual user-local installation" @echo " pip3 install --user [packages] - Manual user-local installation"
@echo " pip install -e . - Install from project directory (dev mode)" @echo " pip install -e . - Install from project directory (dev mode)"
# Install user-local dependencies for markitect (no sudo needed) # Install user-local dependencies for markitect (no sudo needed)
install-deps: install-user-deps:
@echo "📦 Installing MarkiTect dependencies (user-local)..." @echo "📦 Installing MarkiTect dependencies (user-local)..."
@echo "🐍 Target Python: $$(which python3) (version: $$(python3 --version))" @echo "🐍 Target Python: $$(which python3) (version: $$(python3 --version))"
@echo "📍 pip3 location: $$(which pip3)" @echo "📍 pip3 location: $$(which pip3)"
@@ -233,12 +268,12 @@ install-deps:
echo "❌ User-local installation failed (externally-managed-environment)"; \ echo "❌ User-local installation failed (externally-managed-environment)"; \
echo ""; \ echo ""; \
echo "🔧 Alternative solutions:"; \ echo "🔧 Alternative solutions:"; \
echo " 1. Use system packages: make install-system"; \ echo " 1. Use system packages: make install-system-deps"; \
echo " 2. Override restriction: make install-deps-force"; \ echo " 2. Override restriction: make install-force-deps"; \
echo " 3. Create user venv: make install-deps-venv"; \ echo " 3. Create user venv: make install-deps-venv"; \
echo " 4. Use development setup: make setup"; \ echo " 4. Use development setup: make setup"; \
echo ""; \ echo ""; \
echo "💡 Recommended: Try 'make install-system' first"; \ echo "💡 Recommended: Try 'make install' for complete setup"; \
exit 1; \ exit 1; \
fi fi
@echo "🧪 Testing import..." @echo "🧪 Testing import..."
@@ -246,7 +281,7 @@ install-deps:
@echo "💡 You can now use 'markitect' command if it's in your PATH" @echo "💡 You can now use 'markitect' command if it's in your PATH"
# Force install user-local dependencies (overrides externally-managed restriction) # Force install user-local dependencies (overrides externally-managed restriction)
install-deps-force: install-force-deps:
@echo "📦 Force installing MarkiTect dependencies (overriding restrictions)..." @echo "📦 Force installing MarkiTect dependencies (overriding restrictions)..."
@echo "⚠️ This uses --break-system-packages flag" @echo "⚠️ This uses --break-system-packages flag"
@echo " Only use if you understand the implications" @echo " Only use if you understand the implications"
@@ -287,7 +322,7 @@ install-deps-venv:
@echo "💡 To use this, run 'make install-home-venv' instead of 'make install-home'" @echo "💡 To use this, run 'make install-home-venv' instead of 'make install-home'"
# Install system dependencies via apt (requires sudo) # Install system dependencies via apt (requires sudo)
install-system: install-system-deps:
@echo "📦 Installing MarkiTect dependencies via apt..." @echo "📦 Installing MarkiTect dependencies via apt..."
@echo "⚠️ This requires sudo and installs system packages" @echo "⚠️ This requires sudo and installs system packages"
@echo "" @echo ""
@@ -313,7 +348,7 @@ install-system:
echo "💡 You can now use 'markitect' command if it's in your PATH"; \ echo "💡 You can now use 'markitect' command if it's in your PATH"; \
else \ else \
echo "❌ Installation cancelled"; \ echo "❌ Installation cancelled"; \
echo "💡 Alternative: Use 'make install-deps' for user-local installation"; \ echo "💡 Alternative: Use 'make install' for automated setup"; \
fi fi
# Install with development dependencies # Install with development dependencies