From f90277b7bfd047a9a3c58c72fa4967f5d797ae9e Mon Sep 17 00:00:00 2001 From: Kekoa Kaaikala Date: Sat, 25 Feb 2023 23:40:04 +0000 Subject: [PATCH] Project: Use requirements file to install AppImage deps Switch from using `pipenv sync --system` to using the requirements file generated from `pipenv requirements`. The `pipenv sync --system` command (added in #1993) does not work in newer versions of pipenv. It uses the python version of the system rather than the one specified by the --python flag. The `pipenv requirements` command has been added that only pulls from the Pipfile.lock file (pypa/pipenv#4959, pypa/pipenv#5200), and fixed to only dump out requirements for the appropriate system (see pypa/pipenv#5092). --- build_scripts/appimage/appimage.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build_scripts/appimage/appimage.sh b/build_scripts/appimage/appimage.sh index cc0bf731846..d3c8c227eea 100755 --- a/build_scripts/appimage/appimage.sh +++ b/build_scripts/appimage/appimage.sh @@ -78,12 +78,14 @@ install_monkey_island_python_dependencies() { log_message "Installing island requirements" log_message "Installing pipenv" - "$APPDIR"/AppRun -m pip install pipenv==2022.8.14 || handle_error + "$APPDIR"/AppRun -m pip install pipenv || handle_error export CI=1 log_message "Installing dependencies" pushd "$BUILD_DIR/monkey_island" || handle_error - "$APPDIR"/AppRun -m pipenv --python "$APPDIR/AppRun" sync --system || handle_error + "$APPDIR"/AppRun -m pipenv --python "$APPDIR/AppRun" requirements > requirements.txt || handle_error + "$APPDIR"/AppRun -m pip install -r requirements.txt || handle_error + rm requirements.txt popd || handle_error log_message "Uninstalling pipenv (build dependency only)"