-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathpublish-test-pypi.sh
More file actions
executable file
·62 lines (49 loc) · 1.46 KB
/
publish-test-pypi.sh
File metadata and controls
executable file
·62 lines (49 loc) · 1.46 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
#!/bin/bash
# Script to publish QuickFix Python package to Test PyPI
# Usage: ./publish-test-pypi.sh
set -e
echo "=== Publishing QuickFix Python Package to Test PyPI ==="
echo ""
# Check if twine is installed
if ! command -v twine &> /dev/null; then
echo "Error: twine is not installed."
echo "Install it with: pip install twine"
exit 1
fi
# Navigate to the quickfix-python directory
if [ ! -d "quickfix-python" ]; then
echo "Error: quickfix-python directory not found"
echo "Please run package-python.sh first to prepare the package"
exit 1
fi
cd quickfix-python
# Clean previous builds
echo "Cleaning previous builds..."
rm -rf build dist *.egg-info
# Build the package
echo ""
echo "Building package..."
python3 setup.py sdist
# Check if dist directory was created
if [ ! -d "dist" ]; then
echo "Error: Build failed - dist directory not created"
exit 1
fi
# Check the distribution
echo ""
echo "Checking package with twine..."
twine check dist/*
# Upload to Test PyPI
echo ""
echo "Uploading to Test PyPI..."
echo "You will be prompted for your Test PyPI credentials"
echo "(Use API token if configured: username=__token__, password=<your-token>)"
echo ""
PYTHONWARNINGS="ignore" twine upload --verbose --repository testpypi dist/*
echo ""
echo "=== Upload Complete ==="
echo ""
echo "Package uploaded to Test PyPI!"
echo "View it at: https://test.pypi.org/project/quickfix/"
echo ""
echo "To validate the package, run: ./validate-test-pypi.sh"