1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/FastAPI_ynh.git synced 2024-09-03 18:36:00 +02:00

Fix bookworm

This commit is contained in:
Salamandar 2024-05-28 23:40:50 +02:00
parent c8854b27a9
commit 3af000b6a1

View file

@ -36,22 +36,15 @@ myynh_setup_python_venv() {
# Always recreate everything fresh with current python version
ynh_secure_remove "$install_dir/venv"
chown -R "$app:$app" "$install_dir"
# Skip pip because of: https://github.com/YunoHost/issues/issues/1960
python3 -m venv --without-pip "$install_dir/venv"
ynh_exec_as "$app" python3 -m venv --without-pip "$install_dir/venv"
chown -c -R "$app:" "$install_dir"
# run source in a 'sub shell'
(
set +o nounset
source "$install_dir/venv/bin/activate"
set -o nounset
set -x
ynh_exec_as $app $install_dir/venv/bin/python3 -m ensurepip
# using --no-cache-dir option because user doesn't have permission to write on cache directory (don't know if it's on purpose or not)
ynh_exec_as $app $install_dir/venv/bin/pip3 install --no-cache-dir --upgrade wheel pip setuptools
ynh_exec_as $app $install_dir/venv/bin/pip3 install --no-cache-dir -r "$install_dir/requirements.txt"
)
ynh_exec_as $app $install_dir/venv/bin/python3 -m ensurepip
# using --no-cache-dir option because user doesn't have permission to write on cache directory (don't know if it's on purpose or not)
ynh_exec_as $app $install_dir/venv/bin/pip3 install --no-cache-dir --upgrade wheel pip setuptools
ynh_exec_as $app $install_dir/venv/bin/pip3 install --no-cache-dir -r "$install_dir/requirements.txt"
}
myynh_setup_log_file() {
@ -78,4 +71,4 @@ myynh_fix_file_permissions() {
chown -c -R "$app:" "$install_dir"
chmod -c o-rwx "$install_dir"
)
}
}