File size: 906 Bytes
4c6a68b |
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 |
#!/bin/bash
echo "π Starting the PIP package build & upload process..."
# Step 1: Ensure required tools are installed
echo "β
Installing required dependencies (setuptools, wheel, twine)..."
pip install --upgrade setuptools wheel twine
# Step 2: Remove old build directories
echo "ποΈ Cleaning old builds..."
rm -rf dist build *.egg-info
# Step 3: Build the package
echo "π¦ Building the package..."
python setup.py sdist bdist_wheel
# Step 4: Ask user where to upload
read -p "Upload to (1) PyPI or (2) TestPyPI? [1/2]: " upload_option
if [ "$upload_option" == "2" ]; then
echo "π Uploading package to TestPyPI..."
twine upload --repository testpypi dist/*
echo "β
Package uploaded to TestPyPI!"
else
echo "π Uploading package to PyPI..."
twine upload dist/*
echo "β
Package uploaded to PyPI!"
fi
echo "π Done! Your package is now available online."
|