From fb5445d09499e0476ffe9a8587c329987a1cefaa Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Thu, 28 Sep 2023 15:03:01 +0200 Subject: [PATCH] Fix ynh_use_go usage. --- scripts/install | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 2846278..50831da 100644 --- a/scripts/install +++ b/scripts/install @@ -19,7 +19,7 @@ salt=$(ynh_string_random --length=40) #================================================= ynh_script_progression --message="Installing dependencies..." --weight=10 ynh_exec_warn_less ynh_install_go --go_version=$GO_VERSION -trap "ynh_remove_go" EXIT +#trap "ynh_remove_go" EXIT export GOPATH="$install_dir/build/go" export GOCACHE="$install_dir/build/.cache" @@ -49,15 +49,14 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Building the sources (it will take some time)..." --weight=10 -ynh_exec_as $app python -m venv "${install_dir}/venv" +ynh_use_go +ynh_exec_as $app python -m venv "${install_dir}/venv" ( set +o nounset source "${install_dir}/venv/bin/activate" set -o nounset - ynh_use_go - ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH pip install --upgrade pip ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH pip install --upgrade setuptools ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH GOPATH=$GOPATH GOCACHE=$GOCACHE CGO_ENABLED=1 pip install -r requirements.txt