Files
markitect-main/install-pip.sh
tegwick be3902c412 feat: Add Python dependency management and fix test environment
- Add install-pip.sh script for automated Python package installation
- Add pyproject.toml with proper package configuration and setuptools discovery
- Fix virtual environment setup to enable all tests to run successfully
- Tests now pass: 20/20 

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-23 02:41:32 +02:00

75 lines
2.0 KiB
Bash

#!/bin/bash
#
# install-pip.sh - Install Python package dependencies for MarkiTect project
#
# USAGE
#
# run "./install-pip.sh" after activating the virtual environment
# or run "source .venv/bin/activate && ./install-pip.sh"
#
set -e # Exit on any error
echo "🐍 MarkiTect Python Dependencies Installer"
echo "=========================================="
echo ""
# Check if virtual environment is active
if [ -z "$VIRTUAL_ENV" ]; then
echo "⚠️ Virtual environment not detected"
echo " Checking for .venv directory..."
if [ -d ".venv" ]; then
echo "📁 Found .venv directory"
echo " Activating virtual environment..."
source .venv/bin/activate
echo "✅ Virtual environment activated: $VIRTUAL_ENV"
else
echo "❌ No .venv directory found"
echo " Please create a virtual environment first:"
echo " python3 -m venv .venv"
echo " source .venv/bin/activate"
exit 1
fi
else
echo "✅ Virtual environment active: $VIRTUAL_ENV"
fi
echo ""
echo "📦 Installing project in development mode..."
pip install -e .
echo ""
echo "🧪 Installing testing dependencies..."
pip install pytest pytest-cov
echo ""
echo "🛠️ Installing development dependencies..."
pip install black flake8 mypy
echo ""
echo "🏗️ Installing build dependencies..."
pip install build
echo ""
echo "📋 Verifying installations..."
echo " Python: $(python --version)"
echo " pip: $(pip --version | cut -d' ' -f1-2)"
echo " pytest: $(pytest --version | head -n1)"
echo " black: $(black --version)"
echo " flake8: $(flake8 --version | cut -d' ' -f1-2)"
echo " mypy: $(mypy --version)"
echo ""
echo "📚 Installed packages:"
pip list --format=columns
echo ""
echo "✅ Python dependencies installation complete!"
echo ""
echo "🎯 Next steps:"
echo " - Run tests: make test"
echo " - Run linting: make lint"
echo " - Format code: make format"
echo " - Build package: make build"