From 2dc87d7aa75b36ecf44b896e7ca682bdba92ef78 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Mon, 4 May 2020 13:32:00 +0200 Subject: [PATCH 1/3] Use get-pip.py --- scripts/_common.sh | 2 +- scripts/install | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b1f72ef..2ed04d7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,6 +1,6 @@ #!/bin/bash -PKG_DEPENDENCIES="sqlite3 python-dev libldap2-dev libsasl2-dev python3-pip imagemagick" +PKG_DEPENDENCIES="sqlite3 python-dev libldap2-dev libsasl2-dev imagemagick" #PKG_DEPENDENCIES="sqlite3 python3-pip imagemagick" DOSSIER_MEDIA=/home/yunohost.multimedia LOG_FILE=/var/log/$app/$app.log diff --git a/scripts/install b/scripts/install index 07fb946..d971e61 100755 --- a/scripts/install +++ b/scripts/install @@ -94,6 +94,10 @@ ynh_setup_source "$final_path" ynh_script_progression --message="Installing package dependencies..." --weight=15 ynh_install_app_dependencies $PKG_DEPENDENCIES +#use latest version of pip as per documentation in https://github.com/pypa/get-pip +#cannot use helper as maintaining the checksum would be a pain in the a*** +curl https://bootstrap.pypa.io/get-pip.py | python3 + ynh_script_progression --message="Installing pip requirements..." --weight=50 pip3 install --no-cache-dir --target $final_path/vendor -r $final_path/requirements.txt From 15b5b01c3bb431e98cb4a9ccc0cae30e8c40d136 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Mon, 4 May 2020 20:20:34 +0200 Subject: [PATCH 2/3] Update depencies for python3-dev --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 2ed04d7..af50676 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,6 +1,6 @@ #!/bin/bash -PKG_DEPENDENCIES="sqlite3 python-dev libldap2-dev libsasl2-dev imagemagick" +PKG_DEPENDENCIES="sqlite3 libldap2-dev libsasl2-dev python3-dev imagemagick" #PKG_DEPENDENCIES="sqlite3 python3-pip imagemagick" DOSSIER_MEDIA=/home/yunohost.multimedia LOG_FILE=/var/log/$app/$app.log From 2c938052099876f66630b4f66ab5ab0d581ee950 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Wed, 6 May 2020 20:29:23 +0200 Subject: [PATCH 3/3] Upgrade & Restore script via get-pip.py --- scripts/restore | 5 +++++ scripts/upgrade | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/scripts/restore b/scripts/restore index eb2caed..bdcbcac 100755 --- a/scripts/restore +++ b/scripts/restore @@ -86,6 +86,11 @@ chown -R $app: $final_path # Define and install dependencies ynh_script_progression --message="Reinstalling dependencies..." --weight=15 ynh_install_app_dependencies $PKG_DEPENDENCIES + +#use latest version of pip as per documentation in https://github.com/pypa/get-pip +#cannot use helper as maintaining the checksum would be a pain in the a*** +curl https://bootstrap.pypa.io/get-pip.py | python3 + #pip package not required as already in app directory #pip install --target $final_path/vendor -r $final_path/requirements.txt diff --git a/scripts/upgrade b/scripts/upgrade index d59b54b..d330989 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -132,6 +132,10 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Installing package dependencies..." --weight=15 ynh_install_app_dependencies $PKG_DEPENDENCIES + + #use latest version of pip as per documentation in https://github.com/pypa/get-pip + #cannot use helper as maintaining the checksum would be a pain in the a*** + curl https://bootstrap.pypa.io/get-pip.py | python3 ynh_script_progression --message="Installing pip requirements ..." --weight=30 pip3 install --no-cache-dir --upgrade --target $final_path/vendor -r $final_path/requirements.txt