-
Notifications
You must be signed in to change notification settings - Fork 182
Expand file tree
/
Copy pathbuild_and_publish.sh
More file actions
74 lines (65 loc) · 2.04 KB
/
build_and_publish.sh
File metadata and controls
74 lines (65 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
# Build and publish script for SCAK PyPI package
# This script helps prepare the package for PyPI publication
# For Windows users, use build_and_publish.ps1 instead
set -e # Exit on error
echo "======================================"
echo "SCAK Package Build & Publish Script"
echo "======================================"
echo ""
# Check if we're in the right directory
if [ ! -f "setup.py" ]; then
echo "Error: setup.py not found. Run this script from the repository root."
exit 1
fi
# Clean previous builds
echo "1. Cleaning previous builds..."
rm -rf build/ dist/ *.egg-info
echo " ✓ Cleaned"
echo ""
# Install build dependencies
echo "2. Installing build dependencies..."
pip install --no-cache-dir --upgrade "build==1.2.2" "twine==6.0.1"
echo " ✓ Dependencies installed"
echo ""
# Build the package
echo "3. Building package..."
python -m build
echo " ✓ Package built successfully"
echo ""
# Check the distribution
echo "4. Checking package with twine..."
python -m twine check dist/*
echo " ✓ Package check passed"
echo ""
# Display package info
echo "5. Package information:"
echo " Contents of dist/:"
ls -lh dist/
echo ""
# Instructions for publishing
echo "======================================"
echo "Package is ready for publication!"
echo "======================================"
echo ""
echo "To test on TestPyPI:"
echo " python -m twine upload --repository testpypi dist/*"
echo ""
echo "To publish to PyPI (using .pypirc):"
echo " python -m twine upload --config-file .pypirc dist/*"
echo ""
echo "To publish to PyPI (using environment variables):"
echo " export TWINE_USERNAME=__token__"
echo " export TWINE_PASSWORD=<your-pypi-token>"
echo " python -m twine upload dist/*"
echo ""
echo "To install locally and test:"
echo " pip install dist/*.whl"
echo ""
echo "To verify installation:"
echo " python -c \"from agent_kernel import SelfCorrectingKernel; print('Success!')\""
echo ""
echo "To create git tags:"
echo " git tag -a v1.1.0 -m 'Release v1.1.0 - Production features'"
echo " git push origin --tags"
echo ""