#!/bin/bash
# Build the pywasot Python package for PyPI distribution

set -e

cd "$(dirname "$0")/.."

echo "Building pywasot Python package..."
echo

# Clean previous builds
rm -rf dist/*.whl dist/*.tar.gz 2>/dev/null || true

# Build with uv
uv build

echo
echo "============================================"
echo "Build complete!"
echo "============================================"
echo
echo "Built artifacts:"
ls -lh dist/*.whl dist/*.tar.gz 2>/dev/null
echo
echo "To install locally:"
echo "  uv pip install dist/pywasot-*.whl"
echo
echo "To publish to PyPI:"
echo "  uv publish dist/*"
echo "  # or: twine upload dist/*"
echo
