From 2c778cce7f67a7d1c4f156c5854537bc442ed0da Mon Sep 17 00:00:00 2001 From: Stephan Wendel <43513802+KwadFan@users.noreply.github.com> Date: Mon, 4 Mar 2024 01:52:52 +0100 Subject: [PATCH] fix install in chroot fixes #1291 Signed-off-by: Stephan Wendel --- scripts/KlipperScreen-install.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/KlipperScreen-install.sh b/scripts/KlipperScreen-install.sh index 64fceb2f..93192138 100755 --- a/scripts/KlipperScreen-install.sh +++ b/scripts/KlipperScreen-install.sh @@ -108,13 +108,24 @@ create_virtualenv() fi source ${KSENV}/bin/activate - pip --disable-pip-version-check install -r ${KSPATH}/scripts/KlipperScreen-requirements.txt + if [[ "$(uname -m)" =~ armv[67]l ]]; then + echo_text "Using armv[67]l! Adding piwheels.org as extra index..." + pip --disable-pip-version-check install --extra-index-url https://www.piwheels.org/simple -r ${KSPATH}/scripts/KlipperScreen-requirements.txt + else + pip --disable-pip-version-check install -r ${KSPATH}/scripts/KlipperScreen-requirements.txt + fi if [ $? -gt 0 ]; then echo_error "Error: pip install exited with status code $?" echo_text "Trying again with new tools..." sudo apt-get install -y build-essential cmake - pip install --upgrade pip setuptools - pip install -r ${KSPATH}/scripts/KlipperScreen-requirements.txt + if [[ "$(uname -m)" =~ armv[67]l ]]; then + echo_text "Adding piwheels.org as extra index..." + pip install --extra-index-url https://www.piwheels.org/simple --upgrade pip setuptools + pip install --extra-index-url https://www.piwheels.org/simple -r ${KSPATH}/scripts/KlipperScreen-requirements.txt + else + pip install --upgrade pip setuptools + pip install -r ${KSPATH}/scripts/KlipperScreen-requirements.txt + fi if [ $? -gt 0 ]; then echo_error "Unable to install dependencies, aborting install." deactivate