From b8a5245c1b19582db5eea9173643297ca154220f Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 9 Jun 2022 11:15:07 -0400 Subject: [PATCH] Build: Use `pipenv sync --system` instead of requirements.txt When pipenv dumps the lock file to a requirements.txt, it does not include the `sys_platform` directive. This causes pip to attempt to install win32 packages, which fails. By using `pypenv sync --system` instead, only packages applicable to Linux are installed. Fixes #1993 --- build_scripts/appimage/appimage.sh | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/build_scripts/appimage/appimage.sh b/build_scripts/appimage/appimage.sh index 3602b46a18f..60179164d63 100755 --- a/build_scripts/appimage/appimage.sh +++ b/build_scripts/appimage/appimage.sh @@ -79,20 +79,10 @@ install_monkey_island_python_dependencies() { log_message "Installing pipenv" "$APPDIR"/AppRun -m pip install pipenv || handle_error - requirements_island="$BUILD_DIR/monkey_island/requirements.txt" - generate_requirements_from_pipenv_lock "$requirements_island" - - log_message "Installing island python requirements" - "$APPDIR"/AppRun -m pip install -r "${requirements_island}" --ignore-installed || handle_error -} - -generate_requirements_from_pipenv_lock () { - local requirements_island=$1 - - log_message "Generating a requirements.txt file with 'pipenv requirements'" - pushd "$BUILD_DIR/monkey_island" - "$APPDIR"/AppRun -m pipenv --python "$APPDIR/AppRun" requirements --hash > "$requirements_island" || handle_error - popd + log_message "Installing dependencies" + pushd "$BUILD_DIR/monkey_island" || handle_error + "$APPDIR"/AppRun -m pipenv --python "$APPDIR/AppRun" sync --system || handle_error + popd || handle_error }