Skip to content

Commit

Permalink
Project: Use requirements file to install AppImage deps
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
cakekoa committed Feb 27, 2023
1 parent 04910d7 commit c75bacc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build_scripts/appimage/appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down

0 comments on commit c75bacc

Please sign in to comment.