Closes #2000: Remove support for Python 2
This commit is contained in:
16
upgrade.sh
16
upgrade.sh
@@ -5,24 +5,8 @@
|
||||
# Once the script completes, remember to restart the WSGI service (e.g.
|
||||
# gunicorn or uWSGI).
|
||||
|
||||
# Determine which version of Python/pip to use. Default to v3 (if available)
|
||||
# but allow the user to force v2.
|
||||
PYTHON="python3"
|
||||
PIP="pip3"
|
||||
type $PYTHON >/dev/null 2>&1 && type $PIP >/dev/null 2>&1 || PYTHON="python" PIP="pip"
|
||||
while getopts ":2" opt; do
|
||||
case $opt in
|
||||
2)
|
||||
PYTHON="python"
|
||||
PIP="pip"
|
||||
echo "Forcing Python/pip v2"
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Optionally use sudo if not already root, and always prompt for password
|
||||
# before running the command
|
||||
|
Reference in New Issue
Block a user