From 7bab9a03d87f1a94eeaf533d18e1975c0b78dd77 Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Thu, 9 Apr 2020 15:51:59 +0300 Subject: [PATCH] Updated python version to 3.7 --- monkey/monkey_island/deb-package/DEBIAN_MONGO/control | 2 +- monkey/monkey_island/deb-package/DEBIAN_MONGO/postinst | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/monkey/monkey_island/deb-package/DEBIAN_MONGO/control b/monkey/monkey_island/deb-package/DEBIAN_MONGO/control index a47371005..93e062b51 100644 --- a/monkey/monkey_island/deb-package/DEBIAN_MONGO/control +++ b/monkey/monkey_island/deb-package/DEBIAN_MONGO/control @@ -5,4 +5,4 @@ Homepage: https://www.infectionmonkey.com Priority: optional Version: 1.0 Description: Guardicore Infection Monkey Island installation package -Depends: openssl, python3-pip, python3-dev +Depends: openssl, python3.7-dev, python3.7-venv diff --git a/monkey/monkey_island/deb-package/DEBIAN_MONGO/postinst b/monkey/monkey_island/deb-package/DEBIAN_MONGO/postinst index f79a71913..3ae266edc 100644 --- a/monkey/monkey_island/deb-package/DEBIAN_MONGO/postinst +++ b/monkey/monkey_island/deb-package/DEBIAN_MONGO/postinst @@ -3,10 +3,12 @@ MONKEY_FOLDER=/var/monkey INSTALLATION_FOLDER=/var/monkey/monkey_island/installation PYTHON_FOLDER=/var/monkey/monkey_island/bin/python +PYTHON_VERSION=python3.7 # Prepare python virtualenv -pip3 install virtualenv --no-index --find-links file://$INSTALLATION_FOLDER -python3 -m virtualenv -p python3 ${PYTHON_FOLDER} +# This is using the apt package `python3.7-venv` which is listed in the `control` file as a dependency. +# See https://packages.debian.org/stable/python/python3.7-venv +$PYTHON_VERSION -m venv ${PYTHON_FOLDER} # install pip requirements ${PYTHON_FOLDER}/bin/python -m pip install -r $MONKEY_FOLDER/monkey_island/requirements.txt --no-index --find-links file://$INSTALLATION_FOLDER