ai-lead-generation / Makefile
Tolga Kavukcu
Enable browser support
319011b
raw
history blame
1.33 kB
.PHONY: install setup test clean run
# Default target
all: install
# Install all dependencies and browsers
install: install-deps install-browsers
# Install Python dependencies
install-deps:
@echo "πŸ”§ Installing Python dependencies..."
pip install -r requirements.txt
# Install Playwright browsers
install-browsers:
@echo "πŸ”§ Installing Playwright browsers..."
playwright install
# Complete setup (install + test)
setup: install test
# Test browser functionality
test:
@echo "πŸ§ͺ Testing browser installation..."
@python -c "from playwright.sync_api import sync_playwright; \
p = sync_playwright().start(); \
browser = p.chromium.launch(); \
browser.close(); \
p.stop(); \
print('βœ… Browser test successful!')"
# Clean up
clean:
@echo "🧹 Cleaning up..."
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
# Run the application
run:
@echo "πŸš€ Starting AI Lead Generation Agent..."
python app.py
# Development setup (with test)
dev: setup
@echo "πŸŽ‰ Development environment ready!"
@echo "Run 'make run' to start the application"
# Quick fix for browser issues
fix-browsers:
@echo "πŸ”§ Reinstalling Playwright browsers..."
playwright install --force