Skip to content

Commit 2c140b6

Browse files
committed
add publish to pypi manual script
1 parent 20138f6 commit 2c140b6

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

scripts/publish_to_pypi.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
#!/usr/bin/env bash
22

33
# Use this script to manually publish to PyPI!
4-
python3 setup.py sdist bdist_wheel
5-
python3 -m twine upload dist/*
4+
5+
python setup.py sdist bdist_wheel
6+
7+
python -c 'import pkgutil; exit(0 if pkgutil.find_loader("twine") else 2)' || { echo 'Installing twine...'; pip install --quiet twine; }
8+
9+
while true; do
10+
read -p "Do you want to upload to PyPI (Y/N)? " yn
11+
case $yn in
12+
[Yy]* ) python -m twine upload dist/*; break;;
13+
[Nn]* ) exit;;
14+
* ) echo "Please answer yes or no.";;
15+
esac
16+
done

0 commit comments

Comments
 (0)