1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pgadmin_ynh.git synced 2024-09-03 19:56:38 +02:00

Fix pip3 requirement

This commit is contained in:
Josué Tille 2020-07-29 23:14:43 +02:00
parent fedc22a80b
commit 9a91386d18
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
2 changed files with 9 additions and 4 deletions

View file

@ -46,13 +46,15 @@ install_source() {
test -e $final_path/bin/python3 || python3 -m venv $final_path
# Install pgadmin in virtualenv
PS1=""
cp ../conf/virtualenv_activate $final_path/bin/activate
set +u;
source $final_path/bin/activate
set -u;
pip3 install --upgrade pip
pip3 install --upgrade 'Werkzeug<1.0'
pip3 install --upgrade pip3 install -I --upgrade pgadmin$app_main_version==$APP_VERSION
pip3 install --upgrade pgadmin$app_main_version==$app_sub_version
set +u;
deactivate
set -u;
fi
}

View file

@ -82,8 +82,9 @@ ynh_script_progression --message="Configuring sqlite database..."
# initialisation sqlite database for pgadmin
chmod +x ../conf/setup.exp
PS1=""
set +u;
source $final_path/bin/activate
set -u;
ynh_replace_special_string --match_string "__ADMIN_PASSWORD__" --replace_string "$admin_pwd" --target_file "../conf/setup.exp"
../conf/setup.exp "$final_path/bin/python3" "$final_path/lib/python$python_version/site-packages/pgadmin4/setup.py" "$email"
@ -96,7 +97,9 @@ ynh_psql_execute_as_root \
# Add Server In PGadmin database
ynh_replace_string --match_string "__PYTHON_VERSION__" --replace_string "$python_version" --target_file config_database.py
$final_path/bin/python3 config_database.py "$db_user" "$db_pwd"
set +u;
deactivate
set -u;
#=================================================
# GENERIC FINALIZATION