forked from p15670423/monkey
appimage: Use pipenv to install python dependencies
This commit is contained in:
parent
6d0dcd4a7a
commit
98c9b2a907
|
@ -134,14 +134,23 @@ copy_monkey_island_to_appdir() {
|
||||||
install_monkey_island_python_dependencies() {
|
install_monkey_island_python_dependencies() {
|
||||||
log_message "Installing island requirements"
|
log_message "Installing island requirements"
|
||||||
|
|
||||||
requirements_island="$ISLAND_PATH/requirements.txt"
|
log_message "Installing pipenv"
|
||||||
# TODO: This is an ugly hack. PyInstaller and VirtualEnv are build-time
|
"$APPDIR"/AppRun -m pip install pipenv || handle_error
|
||||||
# dependencies and should not be installed as a runtime requirement.
|
|
||||||
cat "$requirements_island" | grep -Piv "virtualenv|pyinstaller" | sponge "$requirements_island"
|
|
||||||
|
|
||||||
|
requirements_island="$ISLAND_PATH/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
|
"$APPDIR"/AppRun -m pip install -r "${requirements_island}" --ignore-installed || handle_error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
generate_requirements_from_pipenv_lock () {
|
||||||
|
log_message "Generating a requirements.txt file with 'pipenv lock -r'"
|
||||||
|
cd $ISLAND_PATH
|
||||||
|
"$APPDIR"/AppRun -m pipenv --python "$APPDIR/AppRun" lock -r > "$1" || handle_error
|
||||||
|
cd -
|
||||||
|
}
|
||||||
|
|
||||||
download_monkey_agent_binaries() {
|
download_monkey_agent_binaries() {
|
||||||
log_message "Downloading monkey agent binaries to ${ISLAND_BINARIES_PATH}"
|
log_message "Downloading monkey agent binaries to ${ISLAND_BINARIES_PATH}"
|
||||||
mkdir -p "${ISLAND_BINARIES_PATH}" || handle_error
|
mkdir -p "${ISLAND_BINARIES_PATH}" || handle_error
|
||||||
|
|
Loading…
Reference in New Issue