# Build and package script for mcp4mcp
Write-Host "π Building mcp4mcp package..." -ForegroundColor Green
# Clean previous builds
Write-Host "π§Ή Cleaning previous builds..." -ForegroundColor Yellow
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue dist, build, *.egg-info
# Install build dependencies
Write-Host "π¦ Installing build dependencies..." -ForegroundColor Blue
pip install build twine
# Build the package
Write-Host "π¨ Building package..." -ForegroundColor Blue
python -m build
# Check the package
Write-Host "β
Checking package..." -ForegroundColor Green
twine check dist/*
Write-Host "π Build complete! Files in dist/:" -ForegroundColor Cyan
Get-ChildItem dist/ | Format-Table Name, Length, LastWriteTime
Write-Host ""
Write-Host "π Package ready for distribution!" -ForegroundColor Green
Write-Host ""
Write-Host "To test locally:" -ForegroundColor Yellow
Write-Host " pip install dist/mcp4mcp-*.whl"
Write-Host ""
Write-Host "To upload to PyPI:" -ForegroundColor Yellow
Write-Host " twine upload dist/*"
Write-Host ""
Write-Host "To upload to Test PyPI:" -ForegroundColor Yellow
Write-Host " twine upload --repository testpypi dist/*"