fix install in chroot fixes #1291

Signed-off-by: Stephan Wendel <me@stephanwe.de>
This commit is contained in:
Stephan Wendel 2024-03-04 01:52:52 +01:00 committed by GitHub
parent 96b624bef0
commit 2c778cce7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -108,13 +108,24 @@ create_virtualenv()
fi fi
source ${KSENV}/bin/activate 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 if [ $? -gt 0 ]; then
echo_error "Error: pip install exited with status code $?" echo_error "Error: pip install exited with status code $?"
echo_text "Trying again with new tools..." echo_text "Trying again with new tools..."
sudo apt-get install -y build-essential cmake sudo apt-get install -y build-essential cmake
pip install --upgrade pip setuptools if [[ "$(uname -m)" =~ armv[67]l ]]; then
pip install -r ${KSPATH}/scripts/KlipperScreen-requirements.txt 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 if [ $? -gt 0 ]; then
echo_error "Unable to install dependencies, aborting install." echo_error "Unable to install dependencies, aborting install."
deactivate deactivate