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:
parent
c8854b27a9
commit
3af000b6a1
1 changed files with 8 additions and 15 deletions
|
@ -36,22 +36,15 @@ myynh_setup_python_venv() {
|
||||||
# Always recreate everything fresh with current python version
|
# Always recreate everything fresh with current python version
|
||||||
ynh_secure_remove "$install_dir/venv"
|
ynh_secure_remove "$install_dir/venv"
|
||||||
|
|
||||||
|
chown -R "$app:$app" "$install_dir"
|
||||||
|
|
||||||
# Skip pip because of: https://github.com/YunoHost/issues/issues/1960
|
# 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
|
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)
|
# 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 --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/pip3 install --no-cache-dir -r "$install_dir/requirements.txt"
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
myynh_setup_log_file() {
|
myynh_setup_log_file() {
|
||||||
|
|
Loading…
Reference in a new issue