From d987dab990b52f744d8f945c48372f8c65259bb3 Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Wed, 10 Apr 2024 14:55:12 +0200 Subject: [PATCH] venv --- scripts/install | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index 60e64f0..8cf3ed6 100755 --- a/scripts/install +++ b/scripts/install @@ -43,12 +43,23 @@ chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R "$app:$app" "$install_dir" -# @@ setup python environment for flohmarkt -ynh_secure_remove "$data_dir/venv" -python3 -m venv --without-pip "$data_dir/venv" +# get flohmarkt +ynh_setup_source --dest-dir="$install_dir" + +# setup python environment for flohmarkt +ynh_secure_remove "$install_dir/venv" +python3 -m venv --without-pip "$install_dir/venv" + +# install python dependencies +( + set +o nounset + source "$install_dir/venv/bin/activate" + set -o nounset + set -x + ynh_exec_as $app $data_dir/venv/bin/python3 -m ensurepip + ynh_exec_as $app $data_dir/venv/bin/pip3 install -r "$install_dir/flohmarkt/requirements.txt" +) -# @@ get git -# @@ install python dependencies # @@ configure # SETUP LOGROTATE