diff --git a/scripts/install b/scripts/install index 8537242..aa96d73 100755 --- a/scripts/install +++ b/scripts/install @@ -66,7 +66,7 @@ fetch_and_extract /opt/yunohost/ihatemoney/src/ ihatemoney # Prepare venv init_virtualenv sudo /opt/yunohost/ihatemoney/venv/bin/pip install -r /opt/yunohost/ihatemoney/src/requirements.txt -sudo /opt/yunohost/ihatemoney/venv/bin/pip install gunicorn>=19.3.0 MySQL-python +sudo /opt/yunohost/ihatemoney/venv/bin/pip install 'gunicorn>=19.3.0' PyMySQL # Fix permissions fix_permissions /opt/yunohost/ihatemoney/src diff --git a/scripts/upgrade b/scripts/upgrade index 98b06ac..7f05d74 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -55,7 +55,7 @@ fix_permissions ${INSTALL_DIR}/src-new/ # Upgrade dependencies sudo ${PIP} install -r ${NEW_REQUIREMENTS} -sudo ${PIP} install gunicorn>=19.3.0 MySQL-python +sudo ${PIP} install 'gunicorn>=19.3.0' 'PyMySQL' # Everything went ok ? Let's keep this code. sudo rm -rf ${INSTALL_DIR}/src @@ -95,5 +95,13 @@ then fi + +# MIGRATION: Switch Python-MySQL -> PyMySQL + +# Python-MySQL is no longer maintained and does not support Py3 +sudo sed -i "s@'mysql://@'mysql+pymysql://@g" ${ihatemoney_conf_path} + + + # Restart backend sudo supervisorctl restart budget