diff --git a/scripts/change_url b/scripts/change_url index 40996aa..faca535 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -85,7 +85,8 @@ fi #================================================= # Edit specific content from nginx configuration #================================================= -settings="$final_path/venv/lib/python3.5/site-packages/weblate/settings.py" +python_version=$(ls -1 $final_path/venv/lib | grep python) +settings="$final_path/venv/lib/$python_version/site-packages/weblate/settings.py" if [ "$old_path" == "/" ] && [ "$new_path" != "/" ] then diff --git a/scripts/install b/scripts/install index 98bd281..64dcdc2 100755 --- a/scripts/install +++ b/scripts/install @@ -207,7 +207,8 @@ admin_mail=$(ynh_user_get_info "$admin" mail) key=$(ynh_string_random 24)$(ynh_string_random 24)$(ynh_string_random 2) redis_db=$(ynh_redis_get_free_db) -settings="$final_path/venv/lib/python3.5/site-packages/weblate/settings.py" +python_version=$(ls -1 $final_path/venv/lib | grep python) +settings="$final_path/venv/lib/$python_version/site-packages/weblate/settings.py" cp "../conf/settings_history/settings.$current_version.py" "$settings" weblate_fill_settings "$settings" diff --git a/scripts/upgrade b/scripts/upgrade index cc50c78..713a056 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -190,7 +190,8 @@ ynh_script_progression --message="Install weblate using PIP..." --time --weight= #================================================= ynh_script_progression --message="Create weblate configuration file..." --time --weight=1 # save old settings file -settings="$final_path/venv/lib/python3.5/site-packages/weblate/settings.py" +python_version=$(ls -1 $final_path/venv/lib | grep python) +settings="$final_path/venv/lib/$python_version/site-packages/weblate/settings.py" old_settings="$final_path/settings.$previous_version.old.py"