We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20138f6 commit 2c140b6Copy full SHA for 2c140b6
scripts/publish_to_pypi.sh
@@ -1,5 +1,16 @@
1
#!/usr/bin/env bash
2
3
# Use this script to manually publish to PyPI!
4
-python3 setup.py sdist bdist_wheel
5
-python3 -m twine upload dist/*
+
+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