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

Try autodetect with ynh

This commit is contained in:
Nicolas Frandeboeuf 2023-07-06 09:05:41 +02:00
parent 09365eb30a
commit 160574330c
2 changed files with 18 additions and 2 deletions

View file

@ -134,7 +134,15 @@ ynh_exec_as $app virtualenv --python=python3 --system-site-packages "${final_pat
source "${final_path}/venv/bin/activate" source "${final_path}/venv/bin/activate"
set -o nounset set -o nounset
ynh_exec_warn_less ynh_exec_as $app RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable-arm-unknown-linux-gnueabihf -q -y' # Rustup has an issue with the autodetection of armfh
# see https://github.com/rust-lang/rustup/issues/3342
rustup_toolchain="stable"
if [ $YNH_ARCH == "armfh" ];
then
$rustup_toolchain="stable-arm-unknown-linux-gnueabihf"
fi
ynh_exec_warn_less ynh_exec_as $app RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain '"$rustup_toolchain"' -q -y'
export PATH="$final_path/.cargo/bin:$PATH" export PATH="$final_path/.cargo/bin:$PATH"
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 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 pip install --upgrade setuptools

View file

@ -165,7 +165,15 @@ ynh_exec_as $app virtualenv --python=python3 --system-site-packages "${final_pat
source "${final_path}/venv/bin/activate" source "${final_path}/venv/bin/activate"
set -o nounset set -o nounset
ynh_exec_warn_less ynh_exec_as $app RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable-arm-unknown-linux-gnueabihf -q -y' # Rustup has an issue with the autodetection of armfh
# see https://github.com/rust-lang/rustup/issues/3342
rustup_toolchain="stable"
if [ $YNH_ARCH == "armfh" ];
then
$rustup_toolchain="stable-arm-unknown-linux-gnueabihf"
fi
ynh_exec_warn_less ynh_exec_as $app RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain '"$rustup_toolchain"' -q -y'
export PATH="$final_path/.cargo/bin:$PATH" export PATH="$final_path/.cargo/bin:$PATH"
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 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 pip install --upgrade setuptools