diff --git a/Makefile b/Makefile index f13ca6ce..2fcc4761 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # MarkiTect - Advanced Markdown Engine # 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 help: @@ -13,17 +13,17 @@ help: @echo "" @echo "Setup & Installation:" @echo " setup - Initial project setup (venv + install-dev)" + @echo " install - Install markitect globally (recommended)" @echo " install-dev - Install package in development mode" - @echo " install-home - Install markitect binary to ~/bin/" - @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 " uninstall - Remove global markitect installation" @echo " list-deps - List required dependencies for markitect" - @echo " setup-dev - Install with development dependencies" @echo " venv-status - Check if venv is active" @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 " test - Run core tests (excluding capability-specific tests)" @echo " test-capabilities - Run all capability-specific tests" @@ -141,6 +141,40 @@ $(VENV)/bin/activate: $(PYTHON) -m venv $(VENV) $(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-dev: $(VENV)/bin/activate @echo "๐Ÿ“ฆ Installing MarkiTect in development mode..." @@ -215,13 +249,14 @@ list-deps: @echo " toml - TOML configuration parsing" @echo "" @echo "๐Ÿ”ง Installation options:" - @echo " make install-deps - Install user-local (recommended)" - @echo " make install-system - Install via apt + pip --user (requires sudo)" + @echo " make install - Install globally (recommended)" + @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 " pip install -e . - Install from project directory (dev mode)" # Install user-local dependencies for markitect (no sudo needed) -install-deps: +install-user-deps: @echo "๐Ÿ“ฆ Installing MarkiTect dependencies (user-local)..." @echo "๐Ÿ Target Python: $$(which python3) (version: $$(python3 --version))" @echo "๐Ÿ“ pip3 location: $$(which pip3)" @@ -233,12 +268,12 @@ install-deps: echo "โŒ User-local installation failed (externally-managed-environment)"; \ echo ""; \ echo "๐Ÿ”ง Alternative solutions:"; \ - echo " 1. Use system packages: make install-system"; \ - echo " 2. Override restriction: make install-deps-force"; \ + echo " 1. Use system packages: make install-system-deps"; \ + echo " 2. Override restriction: make install-force-deps"; \ echo " 3. Create user venv: make install-deps-venv"; \ echo " 4. Use development setup: make setup"; \ echo ""; \ - echo "๐Ÿ’ก Recommended: Try 'make install-system' first"; \ + echo "๐Ÿ’ก Recommended: Try 'make install' for complete setup"; \ exit 1; \ fi @echo "๐Ÿงช Testing import..." @@ -246,7 +281,7 @@ install-deps: @echo "๐Ÿ’ก You can now use 'markitect' command if it's in your PATH" # Force install user-local dependencies (overrides externally-managed restriction) -install-deps-force: +install-force-deps: @echo "๐Ÿ“ฆ Force installing MarkiTect dependencies (overriding restrictions)..." @echo "โš ๏ธ This uses --break-system-packages flag" @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'" # Install system dependencies via apt (requires sudo) -install-system: +install-system-deps: @echo "๐Ÿ“ฆ Installing MarkiTect dependencies via apt..." @echo "โš ๏ธ This requires sudo and installs system packages" @echo "" @@ -313,7 +348,7 @@ install-system: echo "๐Ÿ’ก You can now use 'markitect' command if it's in your PATH"; \ else \ echo "โŒ Installation cancelled"; \ - echo "๐Ÿ’ก Alternative: Use 'make install-deps' for user-local installation"; \ + echo "๐Ÿ’ก Alternative: Use 'make install' for automated setup"; \ fi # Install with development dependencies